• Resolved Hugo Filipe Nunes

    (@hugofilipenunes)


    I’m using Breadcrumb NavXT in my website thenewcodex.com

    I’d like to add a page (name and link) at the beginning of the blog posts trail, but not in the pages.
    Can you help me out?

    I have articles, listed under the category. Every post and category should be under “News”

    Thanks
    hfn

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Havlik

    (@mtekk)

    Set a “Posts Page” in the WordPress settings, under Settings > Reading. You will also have to set a page to use as your front page, but regardless, that’s how you add a page in front of the breadcrumbs for posts. In your case, it appears you want “News” to show up in the breadcrumb trail, so set that as your “Posts Page”. After doing this, you may also have to make sure the “Blog Breadcrumb” setting is checked in the Breadcrumb NavXT settings page.

    Thread Starter Hugo Filipe Nunes

    (@hugofilipenunes)

    Thanks @mtekk

    Solved it by adding this in the beginning of Category Template:

    <a title="Go to the News" href="https://thenewcodex.com/news/"> News</a> >

    Plugin Author John Havlik

    (@mtekk)

    Yeah, that’s not recommended. As I said, the correct way is to set the “Posts Page” to “News” in the WordPress settings.

    Thread Starter Hugo Filipe Nunes

    (@hugofilipenunes)

    Can you explain why?
    Thanks you

    Plugin Author John Havlik

    (@mtekk)

    The first issue is that the category template will be used for all categories, so if you ever use the hierarchy feature of categories, now each category in the breadcrumb trail will have this extra item. Second, since you’ve quasi “hard coded” in a breadcrumb, if anything changes, you will have to update this setting as well to match the changes (change the breadcrumb separator, change the site URL). Lastly, the templates are not meant to be used in this manner, and at any point in the future this may stop working (if strict validation was enforced).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add First Item to trail’ is closed to new replies.