Jump to content

Archived

This topic is now archived and is closed to further replies.

brightonkeller

Hooker plugin - Question about disabling hook for specific posts

Recommended Posts

brightonkeller+    0
brightonkeller

Regarding the Hooker Plugin developed by simon - 

 

I understand that there is an option in admin interface where I can disable hook on a specific "page ID" but I'm curious if I can disable a particular hook on certain individual posts.

 

If this is not an option, then what would you suggest would be the best way to do this? Should I create a custom post type or something? (not sure how to do that but I'm sure I can figure it out and use my child theme...)

 

Here is an example of what I'd like to accomplish - For each post, I have hooks that enable me to place content after each post. Specifically, after each post, Please see screen shot below labeling the 3 different hooks I currently have enabled to display AFTER post content: 

 

pagelines-hooker-question.png

 

There are certain posts where I would like to have NOTHING below the post (i.e., disable all hooks) - simply just the post title and post content.

 

Could you please advise the best way to do this?

 

do I need to do what Danny said in this pagelines forums post? (see below - I pasted his response)

 

In order for your hooks to work on specific pages/posts you will need to use the following.

 

http://codex.wordpress.org/Function_Reference/is_page

http://codex.wordpress.org/Function_Reference/is_single
http://codex.wordpress.org/Function_Reference/is_category

 

 

or would I need something different?

Share this post


Link to post
Share on other sites
Simon    247
Simon
posts and pages are the same, they both have an ID so just add the IDs to that box.

Share this post


Link to post
Share on other sites
brightonkeller+    0
brightonkeller

Simon_P okay thanks. Is there any onther (easier) way to do this?? Any suggestions :) ?

 

I'd rather not tinker with the hooks editor because it makes me nervous....plus I'd rather not have a ton of unique IDs typed in that little box in admin view....it could get messy if you know what I mean?!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

In what you're trying to do, I don't think there is a simpler method to be honest. The one you're using now is the easiest, that I can think of.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • webmktco
      By webmktco+
      I'm getting the following errors when trying to add hooks:

      Here's the debug info: http://www.stackdental.com/?pldebug=1
      Core, themes, and plugins are up to date.
       
       
       
    • art23130
      By art23130+
      We had a very nice shortcodes library and hooker in the previous version of the platform. But in the version 5 they are missing. 
      So are you going to improve it again in future or no they are not supported anymore? 
      and one more question, what do you suggest for sharing bar which we had in DMS2 ?
      Thanks for your effort 
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • dreamsight
      By dreamsight+
      We add phone number to the top right of sites using hooker (example http://hub.theasap.org.uk/) but it's not responsive. Is there a better way to add here, which would be responsive?
×