How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?

You can do this very easily using the_post_navigation. The WordPress reference page for it has more information. the_post_navigation( array( ‘prev_text’=>__(‘Previous: %title’), ‘next_text’=>__(‘Next: %title’), )); That said, if you do want to continue using `wp_link_pages’ then, again, its WordPress resource is your friend, explaining the parameters and how to change them. Hope that helps!

Custom Taxonomy Theme file not routing correctly

The template isn’t determined by the URL, it’s taxonom-{taxonomy_slug}.php See here for the full template hierarchy: https://developer.wordpress.org/themes/basics/template-hierarchy/ And a visual representation: https://wphierarchy.com/ Final Note on Terminology There’s a difference between taxonomies and terms, and muddling the two words or always referring to them as taxonomies will get confusing very quickly. For example ‘accounts’ would be … Read more

plugin overwrites other plugin’s archive-.php file

A core contributor had mercy with me – and an answer: $post_type = get_post_type(‘tires’) is not the correct method to get the post type in a reliable way. Instead, you need to use is_post_type_archive(‘tires’) The correct function looks like this: // Template Logic function rg_wp_tires_template_logic($original_template) { if(is_post_type_archive(‘tires’) || (is_search() && $_GET[‘post_type’] === ‘tires’)) { if(file_exists(get_template_directory_uri() … Read more

How to add HTML to a template only when user is logged out/ not registered

First of all, your shortcode usage code is incorrect, correct code is: echo do_shortcode(‘[loginout_button]’); Now, if you want to echo the login/logout button only when user is not logged in, you can use the function is_user_logged_in(). There are two ways to do this 1). Conditional logic inside your shortcode. add_shortcode(‘loginout_button’,’add_loginout_button’); function add_loginout_button() { if ( … Read more

Single taxonomy for different custom post types

I think this is what you are searching for… You must use both post_type and tax_query to filter your query $query = new WP_Query( array( ‘post_type’ => ‘books’, // name of post type. ‘tax_query’ => array( array( ‘taxonomy’ => ‘fiction’, // taxonomy name ) ) ) ); while ( $query->have_posts() ) : $query->the_post(); // do … Read more