Override methods in Yoast SEO breadcrumb class

In cases like this, open the plugin files in a good code editor and search for the elements you need, as there may be an useful hook. So, for this we have the filter wpseo_breadcrumb_single_link. Maybe you can replace span for li in $link_output, or use $link to build your own: add_filter( ‘wpseo_breadcrumb_single_link’, ‘filter_breadcrumb_wpse_88254’, 10, … Read more

Turn off auto 301 on archive pages? [closed]

This is known bug. You can read something about this here: https://github.com/Yoast/wordpress-seo/issues/1109 michaelcurry there wrote a solution. Quick Fix – Put this into your functions file. add_action(‘wp_loaded’, ‘remove_actions’); function remove_actions() { remove_action( ‘wp’, array( $GLOBALS[‘wpseo_front’], ‘pagination_overflow_redirect’ ), 99 ); }

Genesis / custom template page / setting the page title and meta desc

Yoast Support kindly provided me with the following reference: https://yoast.com/wordpress/plugins/seo/api/ Using the following filters calling my own functions, I was able to change everything in the header based on dynamic content. add_filter(‘wpseo_title’, ‘setPageTitle’, 10); add_filter(‘wpseo_metadesc’, ‘setMetaDesc’, 10); add_filter(‘wpseo_canonical’, ‘setCanonical’, 10); add_filter(‘wpseo_opengraph_image’, ‘setOG_Image’, 10); add_filter(‘the_title’, ‘setTitle’, 10);

Changing Post Sitemap Frequency to Hourly [closed]

As it is explained here ‘wpseo_sitemap_’ . $filter . ‘_change_freq’ the $filter should be replaced with post type that you want to change, you can replace it with: homepage, blogpage, $post_type . ‘_archive’, $post_type . ‘_single’, $c->taxonomy . ‘_term’, author_archive. while the $post_type variable based on WordPress Codex can be replaced with: Post (Post Type: … Read more

How to loop through yoast primary categories? [closed]

Managed to sort it, the primary category is added as post meta to the post, therefore you can pass through the following arguments: ‘meta_key’ => ‘_yoast_wpseo_primary_news-category’, ‘meta_value’ => 1179, Note: your meta key will be different since this is a custom taxonomy that I have set up, if you print the get_post_meta for your posts, … Read more