Thread Starter
Carin
(@sparksfreebies)
Hi Greg, I think I am overcomplicating things again. All I want to do is enable an h1 heading on Ad Category Pages, I copied over the Template files to child theme for any other customizations later on and I created taxonomy-advert_category.php and added to root of Child Theme.
I cannot find taxonomy.php or archive.php in my public_html folder anywhere (using astra theme with child theme)
Your documentations states:
Similarly as in previous paragraph in your current theme directory create a file taxonomy-advert_category.php, copy to it content from taxonomy.php or archive.php and customize to your needs.
Any hints?
Hi,
if i understand correctly the category pages are fine, it is just that the category title is not showing?
If so then the easiest way to fix that would be to add the code below in your theme functions.php file or in a plugin with your own code snippets (https://wpadverts.com/blog/how-to-use-code-snippets-in-wordpress/)
add_action( "adverts_sh_list_before", function() {
if( ! is_tax() ) {
return;
}
$title = get_queried_object()->name;
echo sprintf( "<h1 class='entry-title'>%s</h1>", $title );
} );
Thread Starter
Carin
(@sparksfreebies)
That worked perfectly, thanks!!