You have to edit your theme files. This means that when you update your theme, you’re changes are lost. What you can do is copy the file after you’ve made the changes and replace that after every update.
What you do have to change:
Open your theme folder (wp-content/themes/squirrel
) and look for the file single.php
. Open this file with a text editor.
To remove the meta data
Look in single.php
for:
<ul class="post_meta">
<li class="posted_by"><span><?php _e('Posted by', 'squirrel'); ?></span> <?php the_author_posts_link(); ?></li>
<li class="post_date"><span><?php _e('on', 'squirrel'); ?></span> <?php echo get_the_time('M, d, Y') ?></li>
<li class="post_category"><span><?php _e('in', 'squirrel'); ?></span> <?php the_category(', '); ?></li>
<li class="postc_comment"><span><?php _e('Blog', 'squirrel'); ?></span> <?php comments_popup_link('No Comments.', '1 Comment.', '% Comments.'); ?></li>
</ul>
And replace that with:
<?php
// Don't show the metadata if the post type is easy-photo-album
if ( 'easy-photo-album' != get_post_type() ) {
?>
<ul class="post_meta">
<li class="posted_by"><span><?php _e('Posted by', 'squirrel'); ?></span> <?php the_author_posts_link(); ?></li>
<li class="post_date"><span><?php _e('on', 'squirrel'); ?></span> <?php echo get_the_time('M, d, Y') ?></li>
<li class="post_category"><span><?php _e('in', 'squirrel'); ?></span> <?php the_category(', '); ?></li>
<li class="postc_comment"><span><?php _e('Blog', 'squirrel'); ?></span> <?php comments_popup_link('No Comments.', '1 Comment.', '% Comments.'); ?></li>
</ul>
<?php
} // end if post_type isn't easy-photo-album
?>
To remove the next/previous post links
Look in single.php
for:
<nav id="nav-single"> <span class="nav-previous">
<?php previous_post_link('%link', __('<span class="meta-nav">←</span> Previous Post ', 'squirrel')); ?>
</span> <span class="nav-next">
<?php next_post_link('%link', __('Next Post <span class="meta-nav">→</span>', 'squirrel')); ?>
</span> </nav>
And replace that with:
<?php
// Don't show the post links if the post type is easy-photo-album
if ( 'easy-photo-album' != get_post_type() ) {
?>
<nav id="nav-single"> <span class="nav-previous">
<?php previous_post_link('%link', __('<span class="meta-nav">←</span> Previous Post ', 'squirrel')); ?>
</span> <span class="nav-next">
<?php next_post_link('%link', __('Next Post <span class="meta-nav">→</span>', 'squirrel')); ?>
</span> </nav>
<?php
} // end if post type isn't easy-photo-album
?>
WARNING: besides the warning above (about updating): I havn’t test this code, so make a back-up of single.php
BEFORE editing. If this doesn’t work, you can restore it.