Jump to content

- - - - -

Remove tag line on single post with a hook

  • Please log in to reply
3 replies to this topic

#1 nver



  • Members
  • 2 posts

Posted 22 February 2012 - 03:10 PM

I'm trying to remove the tag line on a single post and I need a hook, because hiding it is not working right. Even when it is hidden, the

Please Login or Register to see this Hidden Content

is still true for the hidden tag paragraph and not the actual visible last paragraph.

#2 Rob


    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 22 February 2012 - 07:09 PM

Hi, could you provide a link to your site? Thanks.

I think the proper code to add to CSS Rules or PageLines Customize plugin's style.css is:

Please Login or Register to see this Hidden Content

#3 nver



  • Members
  • 2 posts

Posted 23 February 2012 - 01:52 PM

Thanks for your reply. I'm testing on a local install, so there is no site. As I mentioned it, hiding it is not working, since the tags paragraph is still on the page, even though it is hidden, and it gets the last-child class. If you have posts with no tags, so no tag paragraph, the bottom margin under the last paragraph, which gets the last-child class, is 0. If you have the tags paragraph, even if it's hidden, the tag paragraph gets the last-child class, so the last visible paragraph has the default margin of 1.6em. This gives an inconsistent spacing under the content. That is why I'm looking for a hook.

#4 Simon_P



  • Administrators

  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 23 February 2012 - 01:58 PM

Wordpress has a built in filter 'get_the_tags' just use that to return null.