Tag archive page not working

Your tag archive hasn’t stopped working because it never existed to begin with. WordPress displays items via the main loop and this takes 2 forms: Individual Posts Post archives If you want to list the categories or tags of your site, you’ll need to create a page for that and use code be it via … Read more

Want to display my custom date archive to date.php but dont know how

You will need to write a custom rewrite rule for this. Just copy the following code into your functions.php and flush rewrite rules. function xlinkerz_custom_archive_rewrite_rule( $rewrite_rules ) { $custom_slug = ‘custom_archive’; $year_rule = array( $custom_slug . ‘/([0-9]{4})/([0-9]{1,2})/?$’ => ‘index.php?year=$matches[1]&monthnum=$matches[2]’ ); $month_rule = array( $custom_slug . ‘/([0-9]{4})/?$’ => ‘index.php?year=$matches[1]’ ); // Merging rules $rewrite_rules = $year_archive … Read more

In Product Category archives how to show Posts having same/similar prod_cat slug structure?

Here I’ve written a function for you- function the_dramatist_get_product_cat_posts( $args = array() ) { $default_args = array( ‘taxonomy’ => ‘product_cat’, ‘get_post_type’ => ‘post’ ); $t = array(); $param = wp_parse_args($args, $default_args); $prod_terms = get_the_terms(get_the_ID(), $param[‘taxonomy’]); foreach ($prod_terms as $prod_term ) { $t[] = $prod_term->term_id; } $posts = get_posts(array( ‘post_type’ => $param[‘get_post_type’], ‘numberposts’ => -1, ‘tax_query’ … Read more

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