Parent and child relation code and display only first child list

With get_term_children you are retrieving a flat array of all child terms. What you want is an array with only the first child terms. Unfortunately there is no immediate way to retrieve this, so it has to be done in two steps: $parent_term = get_term_by(‘slug’, ‘bedroom’, ‘your_taxonomy_slug’); This gives you the ‘bedroom’ taxonomy term. Now … Read more

What’s wrong with default posts archive?

The ‘All Posts’ archive is a Blog. You choose a Blog page in Settings > Reading > Front page displays. It can either be the front page or another page. The template that page uses depends on what templates your theme has and the Template Hierarchy. home.php or index.php will likely be the template you … Read more

Display archives based in post_format

No, you cannot define your own post formats. This is on purpose. The post formats are supposed to be standards, so theme developers can include styles for them. That wouldn’t work if people start making their own formats. Essentially post formats are just a custom taxonomy added to posts. So testing for post format archive … Read more

Change Title Based on Taxonomy Filter in archive-{cpt}.php

I’ll answer this question myself since I found the solution after consulting with my programmer friend. Basically the code above that I posted is wrong, turns out I shouldn’t be using get_the_term_list but to use get_query_var instead. The final code is to replace the above code I posted with these code: EDIT: Change few things … Read more

How to Completely Remove Archive Title a.k.a the_archive_title?

You can add the following function in the functions.php of your child theme. add_filter(‘get_the_archive_title’, ‘my_get_the_archive_title’ ); function my_get_the_archive_title( $title ) { if ( is_category() ) { $title = single_cat_title( ”, false ); } elseif ( is_tag() ) { $title = single_tag_title( ”, false ); } elseif ( is_author() ) { $title=”<span class=”vcard”>” . get_the_author() . … Read more

How to prevent archiving and search engine caching in a free WordPress blog?

Here are a few things you could do. Use the built in Search Engine Visibility setting Access WordPress admin area and go to Settings > select Reading > Search Engine Visibility Check the box that says Discourage search engines from indexing this site. After enabling it, WordPress will edit the robots.txt file and apply disallow … Read more