Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Ben Huson

    (@husobj)

    You can exclude page IDs using:
    [child-pages exclude=”675″]

    Ben, what is the ID for the “Home” page? 1? 0? does it have an ID at all?

    Plugin Author Ben Huson

    (@husobj)

    The ID is a number value associated with a page or post.

    When editing a page you will see it in the address bar, for example the the following URL show the page ID is 675:
    https://example.com/wp-admin/post.php?post=675&action=edit

    Or, you can install a plugin like Simply Show IDs which will show you the IDs in a column when showing you all the pages in the admin.
    https://example.com/extend/plugins/simply-show-ids/

    Ben, I understand that – but what is the ID for Home? It is not a post/page the user creates, I guess ??

    Plugin Author Ben Huson

    (@husobj)

    Yes, if you are using your site with the home page showing all posts it doesn’t exist as a page. In which case, the home page should not be included in the output.

    If you have set a home page in your Settings > Reading options in the admin, then the home page will be the page you selected there.

    Can you confirm if in your Settings > Reading options you have it set to “Your latest posts” or “Use a static page”?

    It is the “Your latest posts” option – that is why I keep on asking about it, otherwise it is crystall clear why we would need an ID for Home (so I do not intend to troll or spam the your forum :D)

    Plugin Author Ben Huson

    (@husobj)

    So is there a Home link appear in the top of your list like the original question at the top of this thread?

    Just trying to help ??

    Exactly, yes. (And thank you for your efforts to help us out, btw)

    Plugin Author Ben Huson

    (@husobj)

    In my testing no home link is added.
    It could possibly be your theme or a plugin that is adding it automatically?

    If you flip to the default WordPress theme do you still have the issue?

    If the Home link still gets added with the default theme, try disabling all other plugins and see if that fixes it. If if does, reactivate each plugin one by one to determine which one is causing the issue, then let me know so I can look into it.

    Thread Starter paljasken

    (@paljasken)

    Hi Ben,

    Thank you very much for looking in to this. As you suggested this is a problem related to my theme. Because when activating another theme there’s no home.

    My theme creates a custom homepage with items that are entered in the appearance settings in admin. This is not an actual page, so it does not have a number.

    I guess I have to learn to live with it or choose a different theme.

    Plugin Author Ben Huson

    (@husobj)

    Which theme is it? – it might be possible to fix with a workaround.

    Thread Starter paljasken

    (@paljasken)

    The Theme is ToomMorel Pro by inkthemes
    https://www.inkthemes.com/

    Plugin Author Ben Huson

    (@husobj)

    It’s a paid-for theme.

    Would you be willing to provide with with the theme files or access to your admin to investigate further?

    Contact me via my website and I’ll let you know my email address to send the files to.

    Ben, I also have an InkTheme – the freely available Blackbird, apparently suffering from the very same problem.

    Plugin Author Ben Huson

    (@husobj)

    So there seems to be an InkThemes theme to these issues…

    I download a trial version of the blackbird theme. The offending code that is causing the issue is the following which automatically runs a function to add the home page to every wp_list_pages() call:

    add_filter('wp_list_pages', 'inkthemes_nav_menu_items');

    You can remove this by adding the following to your theme’s functions.php file, below all the includes at the top, but this will remove home from every use of wp_list_pages() on your site.

    remove_filter('wp_list_pages', 'inkthemes_nav_menu_items');

    I’ll add in some filters to the List Pages Shortcode plugin so that it will be possible to remove it just for the shortcode output.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: List Pages Shortcode] Remove home from children list’ is closed to new replies.