Praktické útržky kódu
Title of the site
<?php bloginfo('name'); ?>
Basic URL of the site
<?php echo site_url(); ?>
<?php echo home_url(); ?>
Exact URL for the site (incl. path)
<?php bloginfo('url'); ?>
Name of the site
<?php bloginfo('name'); ?>
Site’s description
<?php bloginfo('description'); ?>
The style.css style's location
<?php bloginfo('stylesheet_url'); ?>
The style.css style's directory
<?php bloginfo('stylesheet_directory'); ?>
Location for the site’s theme files
<?php bloginfo('template_url'); ?>
Title of the specific post or page
<?php wp_title(); ?>
<?php the_title(); ?>
Url of a specific post or page
<?php the_permalink(); ?>
Category of a specific post or page
<?php the_category(', ') ?>
Author of a specific post or page
<?php the_author(); ?>
ID of a specific post or page
<?php the_ID(); ?>
Link to edit a specific post or page
<?php edit_post_link(); ?>
RSS2 URL for the site
<?php bloginfo('rss2_url'); ?>
Content of the posts
<?php the_content(); ?>
Header.php file's content
<?php get_header(); ?>
Sidebar.php file's content
<?php get_sidebar(); ?>
Footer.php file's content
<?php get_footer(); ?>
The date in '08-18-07' format
<?php the_time('m-d-y'); ?>
Link for the comments on the post
<?php comments_popup_link(); ?>
Links from the blogroll
<?php get_links_list(); ?>
Comment.php file’s content
<?php comments_template(); ?>
**List of pages **
<?php wp_list_pages(); ?>
List of categories
<?php wp_list_cats(); ?>
Url to the next post
<?php next_post_link('%link'); ?>
Url to the previous post
<?php previous_post_link('%link'); ?>
The built-in calendar
<?php get_calendar(); ?>
List of archives for the site
<?php wp_get_archives(); ?>
Next and previous post link
<?php posts_nav_link(); ?>
Include any file
<?php include(TEMPLATEPATH . '/x'); ?>
Value for search form
<?php the_search_query(); ?>
Prints out message
<?php _e(’Message’); ?>
Displays the register link
<?php wp_register(); ?>
Displays the login/logout link
<?php wp_loginout(); ?>
Divides the content into pages
<!--next page-->
Cuts off the content and adds a link to the rest of the content
<a href="https://wordpresso.cz/prakticke-utrzky-kodu/#more-767" class="more-link">Pokračovat ve čtení<span class="screen-reader-text"> "Praktické útržky kódu"</span></a>