WordPress.org

Ready to get started?Download WordPress

Forums

Breadcrumb NavXT
[resolved] Permalinks not working with Custom Rewrite Rules + Custom Post Types (3 posts)

  1. jjjz
    Member
    Posted 1 year ago #

    Hi,

    Ive used this plugin for quite some time on a site brilliantly. But expanding the site into Custom Post Types which need Custom Rewrites for them I am experiencing a few issues I can't figure out how to solve. It might not necessarily be a problem with Breadcrumb NavXT but maybe something I have missed which is impacting the output from the plugin.

    On the breadcrumb the archive page for the custom post type such as :

    Home > {Custom Post Type} > {Article Title}

    The custom post type is outputting the URL : http://domain.com/?post_type={Custom Post Type} rather than the permalink.

    On posts I have the 'post_type_link' filter in WP to tell it how to format out the actual posts links. Is there something along these lines needed to help WP understand what to output for the Archive pages which will help Breadcrumb NavXT understand what to output instead of the ugly URLs WP generates?

    Appreciate any help in understanding how to fix this so URLs are correct for Breadcrumb NavXTs output. Hopefully this helps someone else as well with a similar issue.

    http://wordpress.org/extend/plugins/breadcrumb-navxt/

  2. John Havlik
    Member
    Plugin Author

    Posted 1 year ago #

    What's interesting here is that WordPress, if you are already using 'pretty' permalinks should be giving you a nice permalink structure for you CPTs as well as for your other content. Breadcrumb NavXT uses WordPress API calls that generate the URLs for it, nothing custom there so if things are configured correctly your nice permalinks should propagate everywhere. The only time ugly things show up still in this case is when you have a category with posts and other CPTs as members and you filter by post type on that archive. I'll look more into this.

  3. jjjz
    Member
    Posted 1 year ago #

    Thanks for responding.

    Ive only just managed to get it to handle them by using filters for 'post_type_archive_link' and 'term_link' for custom post types and taxonomies. Based on my own rules in the functions I pass to those filters it handles them as expected and outputs them correctly in Breadcrumb NavXT.

    Greatly appreciate the help and I hope this helps others when using custom post types and taxonomies with own rewrites.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic