Removing The Meta Detail
-
please help someone, I would like to remove the meta details form my album.
how do i do this?
IE the line above the gallery stating:
Posted by admin on Sep, 29, 2013 in Blog Comments Off etc
I just want the gallery to show.
where do I edit the page and what do i remove?
many thanks
Keith
-
What theme are you using?
using Squirrel. can be viewed here:
http://www.hmb-solutions.co.ukthanks for prompt response!
as an after thought, if you click on the galleries:
http://hmb-solutions.co.uk/?easy-photo-album=beerd-galleryyou’ll see the bit i wish to remove
thanks
and just to through a spanner in the works, i also wish for the “next /previous post” links to be removed at the bottom also. 🙂
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 filesingle.php. Open this file with a text editor.To remove the meta data
Look in
single.phpfor:<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.phpfor:<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.phpBEFORE editing. If this doesn’t work, you can restore it.you sir, are a gentleman and a scholar!
Awesome, looks so much better now and works perfectly!
regards and HUGE thanks
UBER KUDOS YOUR WAY!!!
Would you like to write a review as a gesture of appreciation? 😉
Thanks in advance
The topic ‘Removing The Meta Detail’ is closed to new replies.