Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #787138

    Hey guys,

    I want to remove h1 tag from category based shop sites (url.de/produkt-kategorie/xxx). I dont want to hide them only, I need to remove it complete. Is there any hook to remove the h1 functions from standard template (category)?

    <h1 class=’main-title entry-title’></h1>

    best regards
    alex

    #787159

    Hey combra,

    Try adding the following to functions.php

    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
            $args['title'] = get_the_title($id);
            $args['link'] = "";
            $args['heading'] = 'h1';
    
        return $args;
    }

    Adjust the h1 to what you want.

    Best regards,
    Jordan Shannon

    #787171

    Hey Jordan,

    thank you. But this dosent do what I need or do I need to add something else myself? I would like to remove the given headings including <h1> …. </ h1> on all categorys.

    Best regards
    Alex

    #787176

    Hi,

    Are you looking to replace with another h2-6 tag or remove altogether?

    Best regards,
    Jordan Shannon

    #787189

    I want to delete the completely. But only those that are given by the template. The defined by me should be in it.

    this should be deleted:

    <h1 class=’main-title entry-title’></h1>

    <h1 class=”page-title”></h1>

    #787244

    Hi,

    It should be possible to do this via javascript, but I would need to work it out via the admin if you are able to provide login info.

    Best regards,
    Jordan Shannon

    #787807

    Hey, thanks for your reply. It wouldnt be a problem to gave admin access. But I dont know why you want to do it with JS?

    #787924

    Hi,

    JS may be the quicker solution if you want to target specific pages, but perhaps I am misunderstanding.

    Please go to plugins/woocommerce/templates/archive-product.php:

    Search for and remove/edit the following:

    <h1 class="page-title"><?php woocommerce_page_title(); ?></h1>

    Next, please go to themes/enfold/functions-enfold.php:

    On line 377 (or near) remove/edit the following:

    'heading_html'	=> "<{heading} class='main-title entry-title'>{title}</{heading}>",

    Let me know if this works for you.

    Best regards,
    Jordan Shannon

    #788325

    Thanks. This soultion would be delted on any update of woocommerce? And it would delete all headings, not only on categorys or? I will back to you with admin access. (I do not have access right now).

    #788422

    Hi,

    To protect updates you should create a child theme, which would include a functions.php file where you can write custom functions that use the many built-in WooCommerce actions and filters that allow you to modify functionality. Read through WooCommerce documentation for more info.

    Best regards,
    Jordan Shannon

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