Tagged: title bar
How can I prevent the overlap of (lengthy) page titles and breadcrumbs within the title bar?
I’d be open to whatever solution is easiest (or another alternative):
1. Expand width of title bar content area
2. Truncate page titles within title bar
Please see link provided for example of issue.
Hey smiley789654123,
Thank you for the inquiry.
We can use the avf_title_args filter in the functions.php to limit the character length of the page title.
function avf_title_args_mod($args, $id)
{
$args['title'] = avia_backend_truncate( $args['title'], 20, ' ', '...', true, '', true ) ;
return $args;
}
add_filter('avf_title_args', 'avf_title_args_mod', 10, 2);
This should limit the number of characters in the title to 20.
Best regards,
Ismael
When I add that to functions.php, I get the following error…
Your PHP code changes were rolled back due to an error on line 72 of file wp-content/themes/enfold-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘&’, expecting ‘]’
Please advise.
Hi,
I tested the code on my local installation and it does work for me. Please try to copy it from here – https://pastebin.com/3utmBsxa
Alternatively, you can try adding following code to bottom of Quick CSS field in Enfold theme options > Generalt Styling tab to move breadcrumbs to below page title
.title_container .breadcrumb {
position: inherit;
right: 3px;
top: 5px;
}
Best regards,
Yigit
Code from Pastebin worked perfectly. Thank you!
Hi,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Enjoy the rest of your day!
Best regards,
Yigit