Jump to content


Photo

Remove Byline from Sticky


  • Please log in to reply
10 replies to this topic

#1 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 13 January 2012 - 10:35 PM

I am using Platform/PageLines and I have one sticky. I would like just that sticky to not show the author, date and comments sections. Currently those are the three attributes that are on the byline for all posts as defined in the Blog and Posts section of the Page Lines settings. Can someone please help me with code for the style sheet that I can add to make this happen? Again, I want the posts to have that byline info, but not the sticky. I currently have a function that makes the sticky show the whole post and not an excerpt. I got this off a forum. function dan_sticky_filter($content) { if(is_sticky()) $content = the_content(); return $content; } add_filter('the_excerpt', 'dan_sticky_filter'); A bonus would be to remove the "continue reading" at the bottom of the sticky. I am fairly new to wordpress and php and css so step by step instructions would be really welcome. Thanks!

#2 Simon_P

Simon_P

    Messer

  • Administrators



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

Posted 13 January 2012 - 10:38 PM

Stickies have a .sticky class if im not mistaken, you can use display:none

#3 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 13 January 2012 - 10:42 PM

I added .sticky {display:none} to my style.css and now the entire post is hidden! would it be .sticky .byline {display:none} and to remove the "continue reading"?

#4 Simon_P

Simon_P

    Messer

  • Administrators



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

Posted 13 January 2012 - 10:52 PM

Use firebug to find the right classes ;)

#5 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 January 2012 - 07:53 PM

I tried: .sticky .documentByLine {display:none;} And it did not work. Any other suggestions?

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 15 January 2012 - 08:00 PM

Can you please post a link to your site?

#7 Simon_P

Simon_P

    Messer

  • Administrators



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

Posted 15 January 2012 - 08:00 PM

Not sure where you got 'documentByLine' thats not a css class at all.

This will do it:
 .sticky .metabar {
	    display: none;
	}


#8 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 January 2012 - 08:01 PM

Thanks so much Pross! That worked perfectly!

#9 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 January 2012 - 08:04 PM

Any idea what the class is for the "continue reading" link at the bottom of the post?

#10 Simon_P

Simon_P

    Messer

  • Administrators



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

Posted 15 January 2012 - 08:15 PM

 .sticky .continue_reading_link a

You should practice more with firebug ;)

#11 tonyrage

tonyrage

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 January 2012 - 08:20 PM

Thanks. I appreciate the help and I am trying to learn as much on my own as I can. I am not doing any of this as a service to others, for my own use. I have not figured out firebug at all, although I installed it! More research is in order for sure, but I am learning quickly and will try and limit how much I ask questions vs figuring it out on my own.