Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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, M

    #916926

    Hey 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 Shannon

    #916927

    Hey 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.
    #917042

    Hi!

    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,
    Yigit

    #917071

    Perfect – many thanks Yigit.

    #917151

    Hi,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.