Support » Plugin: Flexi Pages Widget » returns nothing when used on custom post type archive and child_of argument

  • Resolved Robert Simpson

    (@rsimpson)



    Hi folks,

    I have a custom post type which has its archive page sitting below a regular page. Using the following on the regular page (with $top_id being the ID for that page), Flexi Pages Widget loads in as expected, but when I use the same code within the template for the custom post type archive (which uses the same sidebar.php as the standard page), the function outputs nothing at all.

    Here’s my code:

    <?php flexipages( 'title_li=&sort_column=menu_order&child_of='.$top_id.'&show_subpages=2' ); ?>

    If I remove child_of, it displays as expected, albeit from the top of the page hierarchy instead of just the children of the top level page it’s within.

    Immediately before the code block above, I echo’d $top_id and it’s definitely using the correct number, so no issues of it being the wrong ID or an empty ID.

    Any ideas?

    Cheers,
    Robert

    https://wordpress.org/plugins/flexi-pages-widget/

Viewing 1 replies (of 1 total)
  • Scratch this. I’d copied an old version from an old installation. I installed an up to date version and it’s behaving as expected now.

Viewing 1 replies (of 1 total)
  • The topic ‘returns nothing when used on custom post type archive and child_of argument’ is closed to new replies.