-
AuthorPosts
-
December 7, 2024 at 4:34 pm #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 youPS 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.December 9, 2024 at 4:16 am #1473193Hey 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,
IsmaelDecember 10, 2024 at 12:02 am #1473290Thank 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.
December 10, 2024 at 12:05 am #1473292The 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.December 10, 2024 at 1:24 pm #1473345Hi,
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,
IsmaelDecember 11, 2024 at 9:17 am #1473399or 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 );
December 11, 2024 at 9:24 am #1473403December 12, 2024 at 12:15 am #1473455Thank you Ismael and Guenni!
December 12, 2024 at 6:07 am #1473467 -
AuthorPosts
- The topic ‘H1 in author and category blogs missed if “only breadcrumbs” in header is used’ is closed to new replies.