I realise your plugin says it is compatible to 3.7.1
I am using 3.8
Your plugin is really great, but I have noticed an issue
if you specify something like pagelist exclude_tree=”7,10″, only the first parameter in the list is used and the rest are ignored
Based on various articles on the web, it sounds like things have changed in WordPress that might have stopped your functionality from working
It would be great if we could get this working again as your plugin is very useful
Also, I thought I could also use the page names rather than the IDs throughout, but that does not seem to work. Perhaps I am misunderstanding this functionality, but it would be great to be able to use page names instead of IDs.
Thank you in advance
https://www.ads-software.com/plugins/page-list/
]]>[pagelist exclude_tree="606"]
https://www.immigrationproject.org/sitemap-test/
page 606 is
IP Board of Directors Resources
Also, can exclude and exclude_tree be used in same shortcode?
Thanks,
Carol
https://www.ads-software.com/extend/plugins/page-list/
]]>i’m gettin crazy while trying to exclude some pages and its children to the menu of my website. Pages id are 40 and 61, so I tried to use this syntax:
<ul>
<li><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_pages(array('title_li' => '', 'exclude_tree' => '40,61')); ?>
</ul>
result: only id 40 and its descendants are excluded. Converse result if commuting the ids.
Then i tried this
<ul>
<li><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_pages('title_li=&exclude_tree=40,61); ?>
</ul>
but nothing change. So, any help will be much appreciated.
]]>This is mean that you can exclude a page, group of pages or tree of pages without editing the main functions.php file while using a child theme.
In your child theme folder create functions.php file and place in it
<?php
function fcs_page_menu_args( $args ) {
$args = array(
'depth' => 0,
'show_date' => '',
'date_format' => get_option('date_format'),
'child_of' => 0,
'exclude' => '',
'exclude_tree' => '',
'include' => '',
'title_li' => __('Pages'),
'echo' => 1,
'authors' => '',
'sort_column' => 'menu_order, post_title',
'link_before' => '',
'link_after' => '',
'walker' => '',
'show_home' => true);
return $args;
}
add_filter( 'wp_page_menu_args', 'fcs_page_menu_args', 'twentyeleven_page_menu_args' );
?>
Note: the fcs is just what i called my menu, you can call it what you want.
I’ve used the basic default set up that wordpress gives you for the options. To exclude a specific page just put in the page id between the single quotes next to ‘exclude’ – for example
'exclude' => '73',
This will remove the page with the id of 73.
To remove a page along with its child pages, put the parent id in the ‘exclude_tree’ section – i.e
'exclude_tree' => '73',
Then in the add_filter part at the bottom, add in your own menu;
Original:
add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
New
add_filter( 'wp_page_menu_args', '<strong>fcs</strong>_page_menu_args', 'twentyeleven_page_menu_args' );
This means that the changes you have made will stay with your child theme and not get overwritten when you update the twentyEleven theme.
Hope this helps, sorry if its been done before! If you know an easier way post and let me know, I’m no expert I was just trying things to see if it worked and it did!! Thought i’d share to make it easier to find – Cheers!
tested on my localhost
]]>I will simplify the code to get to my problem :
<?php $parent_pages_to_exclude = array(8,233);
foreach ($parent_page_to_exclude as $page_to_exclude) :
echo "page_id: $page_to_exlude";
endforeach;
?>
This does not work at all, and does not show any error.
When I am trying the same code naming the variables differently, I get the expected result :
<?php $lols = array(8,233);
foreach ($lols as $lol) :
echo "lol $lol";
endforeach;
?>
What am I missing here? Are variable names expected to not contain underscores anymore?
]]>I have a property website with two pages that have sub pages. The first is a services page that has a bunch of services, and a second pages called listings that has all of the listings below it.
I want to only list the the services children pages, but not the listing children pages.
Now I can use the the exclude_tree argument but that also excludes the listing page – is there a way to exclude the children pages but show the parent page?
]]><?php wp_list_pages('title_li=&menu_order=asc&exclude="131,150,152,154"&exclude_tree="(child_of='30,32,279')"'); ?>
]]>So I’ve been searching the codex and looking at documentation, but I can’t figure this out. Basically, I just want to exclude the child pages from a navigation but keep the parent page title. I was trying with exclude_tree but that also gets rid of the parent.
Any work arounds?
thanks!
_n
]]>Here is the code I am using to generate the dropdown:
<?php wp_dropdown_categories('show_count=1&hierarchical=1&exclude_tree=1,3,4,6,7,8,34,113,234,235&orderby=name'); ?>
Where is the hang-up? I can not figure this out and I am sure it is something simple.
Also, is there a way to I can ‘include’ categories instead of ‘exclude’ them in the ‘exclude_tree’ so that each time I add a cetegory I don’t have to go back and modify my exclude_tree?
Thanks for any input or direction.
]]>I tried this method and it seemed to work on the parent page, but when I clicked on the child page, it only displayed the child. I want a list (like the one below), consistently on every page.
I’m new to all this and still learning so thanks in advanced.
]]>