• 0

DMS 2 Hooker plugin - Question about disabling hook for specific posts


Question

Posted · Report post

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

3 answers to this question

  • 0

Posted · Report post

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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.

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