• Hi there,

    Firstly, your plugin is great and it is working well for me.

    I have an issue though, specifically with posts added using the News Pro plugin which creates posts of type ‘news’.

    I then have a page called “Latest News” with a permalink of /latest-news/ and this lists all of my news summaries using News Pro’s shortcode, as follows:

    [sp_news design=”design-16″ pagination=”true”]

    This works well, and when I visit /latest-news/ Breadcrumb NavXT’s breadcrumbs correct show as Home -> Latest News.

    However, when I click to Read More on a News story, the full News post is displayed, with the address path being, for example:

    /latest-news/introduction-to-the-seminar-for-new-members/

    However, the breadcrumbs displayed by Breadcrumb NavXT just shows:

    Home -> Introduction to the Seminar for New Members

    I.e. it hasn’t included the link to my Latest News page.

    To get the latest news page working with my news posts, I’ve had to add the following into my theme’s functions.php file:

    function wpnw_pro_modify_news_post_slug($slug){
    $slug = ‘latest-news’; // Write your desired slug

    return $slug;
    }

    add_filter( ‘wpnw_pro_news_post_slug’, ‘wpnw_pro_modify_news_post_slug’ );

    function wpnw_pro_modify_news_args($news_args) {

    $news_args[‘has_archive’] = false;

    return $news_args;
    }
    add_filter(‘wpnw_pro_register_post_type_news’, ‘wpnw_pro_modify_news_args’ );

    Basically, I would like my breadcrumbs in the above example to render as:

    Home -> Latest News -> Introduction to the Seminar for New Members

    With the Latest News link taking users back to the Latest News page.

    Any help or advice to make this work would be hugely appreciated!

    Many thanks,

    Matt

    • This topic was modified 7 years, 5 months ago by AbbaTheHorse.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Havlik

    (@mtekk)

    The easiest way to get the “Latest News” breadcrumb into the trail is to go to the Breadcrumb NavXT settings page, go to the “Post Types” tab, scroll down until you find the entries for your “news” post type. Look for a setting called “News Root Page”, in the drop down, find “Latest News”. Then press the “Save Changes” button on the bottom of the screen. That should include the “Latest News” breadcrumb in the breadcrumb trail for all posts of the type “news”.

    Thread Starter AbbaTheHorse

    (@mattalexander)

    That’s fantastic! Thanks for much for such a speedy response, that has sorted my problem.

    Thanks again,

    Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Breadcrumbs don’t always mirror page path’ is closed to new replies.