Jump to content
Sign in to follow this  
fingerprinz

Hide author info in post clips

Recommended Posts

fingerprinz    0
fingerprinz

How do I hide author, put show date and category information in clip style posts?

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

the post-clips have static metabar options because it's a much smaller space but we can create a hook to add/change/remove whatever you want. Make sure you have the Base theme activated and add this to your functions.php file in Base ` add_action('pagelines_loop_clipmeta_end','custom_meta_clip'); function custom_meta_clip(){ <?php if(pagelines('byline_date')):?> <?php _e('on','pagelines');?> <?php the_time(get_option('date_format')); ?> <?php endif;?> <?php if(pagelines('byline_categories')):?> <?php echo '?·';?> <?php _e('in','pagelines');?>? <?php the_category(', ') ?> <?php endif;?> } `

Share this post


Link to post
Share on other sites
fingerprinz    0
fingerprinz

Thanks Adam, but does not work. Get a blank screen when I copy the above code in my base functions.php. Can't access the Control Panel nor the site. Thanks for your help. markus

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

You'll want to delete functions.php and then re-upload the original and then simply use CSS to accomplish what you're after: `.metabar .sword, .post-author{display:none}` Thanks, Bryan

Share this post


Link to post
Share on other sites
fingerprinz    0
fingerprinz

Thanks Bryan. Author is now gone. But how do I ad Category information to clip style posts?

Share this post


Link to post
Share on other sites
Kate    3
Kate

@Markus I didn't try Adam's code, but it looks like the issue is just a couple of missing PHP tags. You could try this: ` function custom_meta_clip(){ ?> <?php if(pagelines('byline_date')):?> <?php _e('on','pagelines');?> <?php the_time(get_option('date_format')); ?> <?php endif;?> <?php if(pagelines('byline_categories')):?> <?php echo '?·';?> <?php _e('in','pagelines');?> <?php the_category(', ') ?> <?php endif;?> <?php } `

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×