Breadcrumb Help: Page to Custom Post Type
-
Hi,
I am trying to insert a page into my breadcrumb path – and the destination is a custom post type.
I understand that WordPress does not play nice with paths of mixed types.
I got Yoast Premium and was pointed to an example using wpsep_breadcrumb_links
********* * DIFFERENT POST TYPES * Page: Change is_single to is_page and 123456 to the page ID ********* add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_remove_limited' ); function wpseo_breadcrumb_remove_limited( $breadcrumbs ) { if ( is_page ( page ID ) ) { return array( 'url' => '', 'text' => '' ); } else { return $breadcrumbs; } }
My questions are:
Do I need to fill in the area ‘url’ and ‘text’ – and it does the rest?
Or do I need to just add this code to the functions.php with my page id – and then fill something out in the Yoast area of said page?
Close (I think) – but don’t want to do something careless and mess up the site (its a dev site so no URL to view.
Thank you for any help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Breadcrumb Help: Page to Custom Post Type’ is closed to new replies.