Query page; remove title hyperlink if excluded from menu. - Wordpress Solution
[Solved] - Query page; remove title hyperlink if excluded from menu. - Wordpress Solution |
---|
Try following codes |
Hello,
Situation;
Currently querying all sub pages based on a predefined parent ID into a list, it works … however some of those pages the titles will link to the actual page and some, may not because they maybe lacking content.
Plugin;
Currently using a plugin called ‘Exclude Pages from Navigation’
source: [[LINK href="http://wcdco.info/ba "]]http://wcdco.info/ba [[/LINK]]
This was before WP 3.0, I really like how easy it for my clients to decided what pages to exclude.
Problem;
The question is … how could I build an IF statement that determines if this ‘post’ has been excluded using [[LINK href="http://wcdco.info/ba"]]this plugin[[/LINK]], don’t show /
If NOT excluded show Title …
In my DB I see a new entry ‘option_id 551’ with a column labeled ‘option_value ‘ that contains my id’s 2,3,4,5,6,7,8,9 etc.
How difficult would this be? Any assistance you can provide would be much appreciated.
Thanks!
Solution - 1If you are referring this post as current page then you have to pass $post->ID.
Solution - 2You can use something like $pages will now have an array of all the page id's (array(1, 2, 3)), that are selected. Solution - 3You could try using ep_get_excluded_ids function from the plugin:
|
Date: 2022-10-21 05:21:06 |
Category: Wordpress |