WordPress Theme Tag


Last modified From

</span></code>
This post was written by <?php the_modified_author(); ?>

Displays a list of the tags with a linebreak after it.

<span style="color: #0000bb;"><?php the_tags</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'Tags:'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">', '</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'<br />'</span><span style="color: #007700;">); </span><span style="color: #0000bb;">?></span> </span></code>


Display Edit in Paragraph Tag

Displays edit post link, with link text "edit", in a paragraph (<p>) tag.

<?php edit_post_link('edit', '
', '
'); ?>

Displays Edit Comment in Paragraph Tag

Displays edit comment link, with link text "edit comment", in a paragraph (<p>) tag.

<?php edit_comment_link('edit comment', '
', '
'); ?>

previous posts link

<?php previous_posts_link('« Previous Entries', '0') ?>

Next Post link

<?php next_posts_link('Next Entries »', 0); ?>

Next Comment link

<?php next_comments_link( 'Newer Comments »', 0 ); ?>

previous comment link

<?php previous_comments_link( '« Older Comments' ); ?>

Include Title in "More"

Similar to the above example, but thanks to the_title() tag and the display parameter, it can show "Continue reading ACTUAL POST TITLE" when the <!--more--> Quicktag is used.

<?php the_content("Continue reading " . the_title('', '', false)); ?>

Display Home as a Page

The following example causes "Home" to be added to the beginning of the list of Pages displayed. In addition, the Pages wrapped in a div element, Page IDs 5, 9, and 23, are excluded from the list of Pages displayed, and the pages are listed in Page Order. The list is prefaced with the title, "Page Menu",

<h2>Page Menu</h2>

Including Any Template

WordPress offers the above tags for including those specific Templates, but there is also a convenient way to include any file. To do so, you will need to use the include PHP function, and a constant WordPress conveniently defines for you to make things easy: TEMPLATEPATH.

Suppose you want to include a file called header2.php. Just insert the following line in your template where you want that file's information to appear.

<?php include (TEMPLATEPATH . '/header2.php'); ?>

<?php wp_page_menu('show_home=1&exclude=5,9,23&menu_class=page-navi&sort_column=menu_order'); ?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s