Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1473159

    Hello!
    I use my own <h1> in pages and I disabled header option to “breadcrumbs only” to prevent duplication.
    But categories blogs and authors blogs now are without <h1> too.
    Is it possible to fix it?
    https://buzaevclinic.ru/category/team/
    Thank you

    PS I can turn the general option: “header and breadcrumbs” on and
    set every page “breadcrumbs only” page-by-page manner, but there are too many of them
    so if I could run SQL in phpmyadmin to change options of every page to “breadcrumb only” in can be a solution.
    But I need the SQL-command not to break the structure.

    #1473193

    Hey ibuzaev,

    Thank you for the inquiry.

    Please enable the breadcrumbs and title, then add this filter in the functions.php file to remove the title on pages:

    function avf_title_args_mod( $args, $id ) {
        if ( is_page() ) {
            $args['title'] = ''; 
        } 
        return $args;
    }
    
    add_filter( 'avf_title_args', 'avf_title_args_mod', 10, 2 );
    

    Best regards,
    Ismael

    #1473290

    Thank you, Ismael,
    Will it remove the title in posts too? I do not want them to be there too.

    • This reply was modified 1 week, 5 days ago by ibuzaev.
    #1473292

    The problem that title in breadcrumbs block should be short to fit into the block without conflict with breadcrumbs.
    Another longer H1 tag can be added below
    and also there is SEO meta title. This results in conflicts of the short and long versions of title.

    #1473345

    Hi,

    Thank you for the update.

    Will it remove the title in posts too?

    To remove the title from posts, replace the filter with the following:

    function avf_title_args_mod( $args, $id ) {
        if ( !is_archive() ) {
            $args['title'] = ''; 
        } 
        return $args;
    }
    
    add_filter( 'avf_title_args', 'avf_title_args_mod', 10, 2 );
    

    This modification ensures that the title modification only applies to non-archive pages.

    Best regards,
    Ismael

    #1473399

    or if you got h1 headings in content – why not using h2 tag by using the same filter

    function avf_title_args_mod( $args, $id ) {
        if ( !is_archive() ) {
            $args['heading'] = 'h2'; 
        } 
        return $args;
    }
    add_filter( 'avf_title_args', 'avf_title_args_mod', 10, 2 );
    #1473403

    Hi!

    Thank you for the info @Guenni007.

    Cheers!
    Ismael

    #1473455

    Thank you Ismael and Guenni!

    #1473467

    Hi,

    No problem! Glad we could be of help. Please feel free to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘H1 in author and category blogs missed if “only breadcrumbs” in header is used’ is closed to new replies.