How to change the canonical link from a category or taxonomy archive?

I found the solution by myself: function yoast_seo_canonical_change_archives( $canonical ) { if ( is_tax( ‘tourist-spots’ ) ) { $path = parse_url( $canonical, PHP_URL_PATH ); return ‘https://www.luxuryvillasphuketthailand.com’ . $path; } return $canonical; } add_filter( ‘wpseo_canonical’, ‘yoast_seo_canonical_change_archives’, 10, 1 );

Problem with pagination link (error 404)

I have something here that I used on the website of a real estate agency You’re already using Bootstrap. But, take a look https://getbootstrap.com/docs/4.0/components/pagination/ In your code, a line before var $actualPagina = get_query_var… Add: global $actualPagina; So here’s what you do… Replace <?php get_template_part ( ‘paginacion_prop’ );?> by <?php thomas_pagination($propiedades->max_num_pages);?> In your functions.php enter … Read more

Menu links URL with PHP GET method

Well. After a little search with the intention to find a way to re-use my category template (Sport), I found the solution of my problem: Force sub-categories to use the parent category template So I let this solution here in case of someone has the same problem and the same weird idea to resolve it … Read more

Link to index.php from home.php?

You can’t link between templates. Not directly. The template files are just the files that WordPress will use to render the posts it’s found, based on the URL. You can see how WordPress decides which template to load under which circumstances in the Template Hierarchy. So to solve this issue we need to determine when … Read more