-
AuthorPosts
-
February 23, 2018 at 11:57 pm #916925
Hi Guys – had a look around for a solution and those I’ve found don’t seem compatible with current version of Enfold.
I need to remove the “Archive for: ” prefix in page titles of archive pages so that just the category title is displayed through a child theme (must survive updates).
Can this be achieved with a function or a template edit?
Many Thanks, MFebruary 24, 2018 at 12:14 am #916926Hey M1000000,
Please provide a link to the site and page in question so we can look into this issue further. Also provide admin info in the private area in case we need to access the functions file.
Best regards,
Jordan ShannonFebruary 24, 2018 at 12:15 am #916927Hey Jordan – sorry currently localhost – but this question relates to any and all Enfold installs so hopefully shouldn’t need access to a specific site.
For clarity – when you visit any archive page the category name in the page title is prefixed with “Archive for: ” – it looks like this:
<h1 class="main-title entry-title"><a href="https://www.domain.com/category/category-name/" rel="bookmark" title="Permanent Link: Archive for: Established" itemprop="headline">Archive for: Category name</a></h1>
I am looking to remove Archive for: from this title.
Instruction for template edit or snippet for functions.php would be great.
Thanks, M
- This reply was modified 6 years, 9 months ago by M1000000.
February 24, 2018 at 10:23 am #917042Hi!
Please add following code to bottom of Functions.php file in Appearance > Editor
add_filter('avf_which_archive_output','avia_new_archive_output'); function avia_new_archive_output(){ if (is_archive()) { $output = __('','avia_framework')." ".single_tag_title('',false); } return $output; }
Reference link: https://github.com/KriesiMedia/enfold-library/blob/9e5d887eea5bbb95060bd5edd19a9ba4aa9731c0/actions%20and%20filters/avf_which_archive_output
Regards,
YigitFebruary 24, 2018 at 1:18 pm #917071Perfect – many thanks Yigit.
February 24, 2018 at 3:55 pm #917151Hi,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.