How to Remove After Post Widget Only from Sticky Post

Community Forums Forums Design Tips and Tricks How to Remove After Post Widget Only from Sticky Post

This topic is: not resolved

Tagged: ,

This topic contains 14 replies, has 2 voices, and was last updated by  Fabio 1 year, 7 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #30940

    Fabio
    Participant
    Post count: 185

    Theme Eleven 40

    Basically I’m using the wonderful enews extended plugin for my after post, but I don’t need it in my sticky post.

    How do I remove the after post exclusively from the sticky post?

    Thanks guys! You’re the best.

    #31024

    braddalton
    Participant
    Post count: 10217

    Link to the sticky post please


    #31065

    braddalton
    Participant
    Post count: 10217

    You can install the Widget Logic plugin and add a conditional tag for sticky posts to your Genesis eNews Widget.
    [php]
    is_sticky()
    [/php]

    Or you can add the conditional tag to the custom function in your child themes functions.php file.


    #31067

    Fabio
    Participant
    Post count: 185

    Hi braddalton

    thanks very much for your reply!

    Here’s a link to my sticky post:

    http://letstalksex.net/welcome/

    As you can see the problem is that I already have an opt-in on my sticky page and dont need the after post :)

    To be honest, for your last reply I don’t quite understand exactly what to do…  :)

    Is there any way to do this without plugins?

    Thank you!!!

     

     

    #31073

    braddalton
    Participant
    Post count: 10217

    [css]
    // Remove after post widget from sticky post
    .post-585 .after-post {
    display: none;
    }
    [/css]

    Paste this CSS code at the end of your child themes style.css file.


    #31089

    Fabio
    Participant
    Post count: 185

    Hi braddalton,

    thank you for your reply and your help.

    Unfortunately it’s not working. I didn’t test it on my blog but on my test site (which has got the same theme) as I always do.

    http://exclusiveskills.com/tantric-sex/

    the after post still appears…

    Is there anything else you would suggest me to try?
    Thank you very much!

    #31108

    braddalton
    Participant
    Post count: 10217

    Because your post-i.d on your test site is probably different.

    I grabbed the post i.d from the source code on your live site. I don’t have access to your test site.

    The code works because i tested it on your live site as a new CSS rule using Firebug.


    #31125

    Fabio
    Participant
    Post count: 185

    Ok thanks.

    I pasted the code at the bottom of my CSS file on my blog, but it’s not working. The after post is still displayed as you can see:

    http://letstalksex.net/welcome

    #31133

    braddalton
    Participant
    Post count: 10217

    This works. Just tested it again.
    [css].post-585 .after-post {display: none;}[/css]


    #31134

    Fabio
    Participant
    Post count: 185

    Sorry,

    I pasted that bit of code at the bottom of my CSS. It’s there now. It was there after I posted my last message. If you go on that page and can see the after post, know that the code has been pasted already.

    Here we go, this is the very bottom of my CSS right now:

     

    .footer-widgets-1,
    .footer-widgets-2,
    .footer-widgets-3 {
    margin: 0;
    }

    #footer .creds,
    #footer .gototop {
    float: none;
    }

    #footer p {
    padding: 0 20px;
    text-align: center;
    }

    }

    // Remove after post widget from sticky post
    .post-585 .after-post {display: none;}

     

    but if you go on my blog, the after post is still there even though my CSS is the one I just pasted above this phrase.

    Am I pasting it in the wrong place?

    #31308

    Fabio
    Participant
    Post count: 185

    Hi,

    I’ve tried using the web deveoper option with firefox and when I paste that bit of code you gave me, the after post does disappear. But when I paste it in real life, it does not.

    Could you please check if I pasted it in the right place? In my previous message you can see the bottom of my CSS as it is right now.

    But if you go on

    http://letstalksex.net/welcome

    the after post is still there.

    Thanks a lot for your help!

    #31313

    braddalton
    Participant
    Post count: 10217

    Remove this: // Remove after post widget from sticky post

    If this doesn’t work, install the Widget Logic plugin and add the conditional tag to the after post widget to exclude it from displaying on that post.
    [php]
    !is_single (’585′)
    [/php]

    Otherwise you’ll need a custom function.


    #31351

    Fabio
    Participant
    Post count: 185

    GREAT!

    It works now. Thank you VERY much!

    #31353

    braddalton
    Participant
    Post count: 10217

    Great! Which method did you use?


    #31364

    Fabio
    Participant
    Post count: 185

    Well, I simply deleted this bit:

    // Remove after post widget from sticky post

    it was enough!

    Thanks again!

     

     

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.