Open “Visit site” in a new window?

This should do it (put it in a network activated plugin): add_filter( ‘myblogs_blog_actions’, ‘my_sites_visit_site_target_blank’, 10, 2 ); function my_sites_visit_site_target_blank( $actions, $user_blog ) { $to_replace = “>” . __( ‘Visit’ ) . ‘</a>’; $to_replace_with = ” target=”_blank” >” . __( ‘Visit’ ) . ‘</a>’; return str_replace( $to_replace, $to_replace_with, $actions ); }

How to create custom search page

you dont need extra queries, all you would need is to sort the search results by post type. you can find a way to do so here. and then, inside your search.php template, you would need to check for the post-types and act accodringly.. while (have_posts()) : the_post(); $post_type = get_post_field( ‘post_type’, get_the_ID() ); if … Read more

Is there a straight-forward way to provide a meta description tag via Yoast SEO, programmatically, without relying on the admin panel?

Way overthinking it: <?php add_filter(‘wpseo_opengraph_desc’, function () use (&$data) { $seo_intro = trim($data->seo_intro); if ($seo_intro === ”) { $seo_intro = “{$data->name} – {$data->title}”; } return esc_attr(wp_strip_all_tags(stripslashes(do_shortcode($seo_intro)))); }, PHP_INT_MAX); ?> Essentially, hijack the content with a filter (since that’s what Yoast is using to derive the description) and make sure it’s the last filter to be … Read more

How to create a page /1 using ?

Parts of this are easy, and parts of this are not so easy. It depends on how complete of a solution you’re looking for. Fixing the native pagination functions, for example, is probably more effort than it’s worth. The problem is the fact that “page 0” and page 1 are the same page is baked … Read more