Jump to content
Sign in to follow this  
davidcsonka

Possible to disable a hook on specific blog posts?

Recommended Posts

davidcsonka

Example: I have a hook set up to insert a related blog posts list, and an email subscription form at the bottom of all my blog posts content area. For conversion reasons, I'd like to disable this for a few specific blog posts so that I can direct reader actions to just one thing on the page, ergo less distraction. I don't see any functionality in the blog post controls to disable a hook, just to disable certain sidebars or adjust template settings. Any suggestions on how to implement this? I toyed with moving the lists and forms to a sidebar element and have that display below the content area, but sidebar widgets don't like php.

Share this post


Link to post
Share on other sites
catrina

I think you can hide your related blog posts list and e-mail subscription form on certain pages using CSS. If you post a link to a specific post where you do not want the related blog posts list to appear, I can give you an example of what CSS to use for hiding it and that same CSS can be applied to other pages where you want the list + subscription form to hide.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
davidcsonka

Yes, that would be helpful, please

Share this post


Link to post
Share on other sites
Jenny

I hope you can figure this one out, catrina. The only thing I can hide using CSS is the actual email subscribe field. :(


Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
davidcsonka

I took care of it. I had not really thought about using CSS before, but after you mention it, it makes a lot of sense. I went ahead and wrapped the contents of that hook with a div, and just gave it a unique ID. Then, I installed the Art Direction WP plugin which makes it easy to add embedded styles to specific blog posts. I added a style for display:none for the div inside the hook, problem solved. Thanks!

Share this post


Link to post
Share on other sites
Jenny
That's great! Glad you got it figured out. :)

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

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  

×