Hello,
I'm not good in coding and I did not find a easy solution for my need:
I have a woocoomerce site for which I want to setup a blog as well now. In my themes folder I found this file: template-archives.php with the following code which I had to modify to not list certain pages with those IDs found behind the "exclude" parameter:
echo avia_advanced_hr(false);
echo "<div class='one_third first archive_list'>";
echo "<h3>" . __('Available Pages','avia_framework') . "</h3>";
echo "<ul>";
wp_list_pages('title_li=&depth=-1&exclude=9,10,11,12,13,14,15,16,17,943,966,2350,2668' );
echo "</ul>";
echo "</div>";
As this will become impractical soon or later, I'm thinking about a plugin-free solution with a filter in functions.php or something similar. I want to ad a custom field like key=AvoidPageList value=true/false which can be assigned in the custom field section while editing a page. And the filter (or some function) should exclude those from wp_list_pages function.
Any Idea how to accomlish this?
btw. the reason why I want this is, that some pages like the start page will change often or are avaiable in different version for content experiments. Also some woocommerce pages like the checkout page or thank you page are retrieved by wp_list_page function which should not be there as they often contain google goal tracking etc.
Thanks for hints or codes
Tom