-
AuthorPosts
-
November 22, 2020 at 6:05 pm #1262135
Hello,
I would like to change the link in the generated breadcrumb visiting a post. Now it links to /category/blog. I would like to change that to the page where I show my own version of the category-page. So I would like to link to my own page in the breadcrumbs. Can you help me with that?
Regards,
Erwin
November 23, 2020 at 6:45 am #1262262Hi Erwin,
Can you try to change the permalink in Settings > Permalinks > Optional > Category base?
Let us know if this helps.Best regards,
NikkoNovember 23, 2020 at 12:03 pm #1262325Hi,
That was my thought to. But I have multiple categories, al with their specific page where the cat is displayed. How can I set a base for that?
regards,
ErwinNovember 23, 2020 at 2:54 pm #1262389Hi Erwin,
I see, can you give us links so we can try to have the same setup and try to give some code that might help?
Using this format: link – how breadcrumb should be structured
Example:
mywebsite.com/blog/article1 – home > blog > seo
mywebsite.com/blog/article2 – home > blog > design
You can post it in private content.Best regards,
NikkoNovember 23, 2020 at 4:47 pm #1262436Hi,
I’ve put the links in the private-content area below.
Regards Erwin
November 24, 2020 at 1:35 pm #1262653Hi Erwin,
I can’t see any breadcrumbs on its articles.
Do you want it to look something like the breadcrumbs posted in private content?Best regards,
NikkoNovember 24, 2020 at 3:55 pm #1262717Hi,
In that case the site would use the default categories. I’ve created a page for those categories to show the posts on that specific way. So, instead of the category page, I would like to use the specific pages. See the image for the breadcrumbs
Regards
ErwinNovember 27, 2020 at 3:03 pm #1263529Hi Erwin,
I apologize for the delayed response.
Thanks for the screenshot, that’s actually a post (category) meta.
You can use this hook to redirect it to the page you want instead of the category page and put it in your child theme’s functions.php:function category_template_redirect() { if ( is_category( 'blog' ) ) { $url = site_url( '/blog' ); wp_safe_redirect( $url, 301 ); exit; } elseif ( is_category( 'cases' ) ) { $url = site_url( '/cases' ); wp_safe_redirect( $url, 301 ); exit; } } add_action( 'template_redirect', 'category_template_redirect' );
The other workaround is use a redirect plugin.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.