get_month_link uses what wordpress template?

get_month_link() doesn’t use any template. It just creates a link to date based archives. The actual template used is decided by a rather complicated template hierarchy system managed by Core. Essentially there is a cascading sequence of files that will be used if those files are provided by the theme: date.php archive.php index.php

How to force sub-product-category to use the parent category template

I solved it, after facing these 2 issues: 1- use template_include in filter instead of taxonomy_template 2- I reordered these lines according to my need. // Current first $templates[] = “category-{$category->slug}.php”; $templates[] = “category-{$category->term_id}.php”; // Parent second $templates[] = “category-{$parent->slug}.php”; $templates[] = “category-{$parent->term_id}.php”; $templates[] = ‘category.php’; So here is my final code: /** * Filter … Read more

Custom post type not respecting template hierarchy

From what you’ve told us, your single-case-study.php should be the correct file. To help troubleshoot, add this line to your header.php: <!– <?php global $template; print_r($template); ?> –> Then view the source of a single case study and see which template WP is outputting. Once you have identified the file, if the solution isn’t clear, … Read more

Use one template only for custom post type archives?

add_filter( ‘template_include’, ‘wpsites_cpt_archive_page_template’, 99 ); function wpsites_cpt_archive_page_template( $template ) { if ( is_post_type_archive() ) { $new_template = locate_template( array( ‘your-cpt-template.php’ ) ); if ( ” != $new_template ) { return $new_template ; } } return $template; } Try this in your functions file. You can add your post types to this line like this: if … Read more

how to force tag page layout to use same as search layout?

You can tell WordPress to use the search.php template whenever viewing tags by using the template_include. It works like this: function wpse_240429() { // IF we’re planning on loading a tag template if( is_tag() ) { // Try to locate the search.php template $search_template = locate_template( ‘search.php’ ); // If the search template exists if( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)