Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to Remove After Post Widget Only from Sticky Post
Tagged: after post, sticky
- This topic has 14 replies, 2 voices, and was last updated 11 years, 10 months ago by
Fabio.
-
AuthorPosts
-
March 24, 2013 at 12:51 pm #30940
Fabio
ParticipantTheme 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.
March 24, 2013 at 8:01 pm #31024Brad Dalton
ParticipantMarch 25, 2013 at 3:10 am #31065Brad Dalton
ParticipantYou can install the Widget Logic plugin and add a conditional tag for sticky posts to your Genesis eNews Widget.
is_sticky()
Or you can add the conditional tag to the custom function in your child themes functions.php file.
March 25, 2013 at 3:19 am #31067Fabio
ParticipantHi 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!!!
March 25, 2013 at 5:12 am #31073Brad Dalton
Participant// Remove after post widget from sticky post .post-585 .after-post { display: none; }
Paste this CSS code at the end of your child themes style.css file.
March 25, 2013 at 6:56 am #31089Fabio
ParticipantHi 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!March 25, 2013 at 8:34 am #31108Brad Dalton
ParticipantBecause 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.
March 25, 2013 at 9:49 am #31125Fabio
ParticipantOk 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:
March 25, 2013 at 10:14 am #31133Brad Dalton
ParticipantThis works. Just tested it again.
.post-585 .after-post {display: none;}
March 25, 2013 at 10:20 am #31134Fabio
ParticipantSorry,
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?
March 26, 2013 at 8:21 am #31308Fabio
ParticipantHi,
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!
March 26, 2013 at 8:49 am #31313Brad Dalton
ParticipantRemove 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.
!is_single ('585')
Otherwise you'll need a custom function.
March 26, 2013 at 11:35 am #31351Fabio
ParticipantGREAT!
It works now. Thank you VERY much!
March 26, 2013 at 11:39 am #31353Brad Dalton
ParticipantMarch 26, 2013 at 12:04 pm #31364Fabio
ParticipantWell, I simply deleted this bit:
// Remove after post widget from sticky post
it was enough!
Thanks again!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.