Archived topic
Adding PHP line in the child theme?
3 replies · Started by Dani on December 27, 2022
I read the in the documentation here, however, I still don't know how to accomplish what I want.
I do have installed and activated GP Child theme and I want to add 1 line of code to display breadcrumbs in my posts.
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs();
My style.css and functions.php are both empty. How do I add that line and where? The point is not to lose it after GP is update (hence why I have the child theme)
Hi Dani,
Are you wanting to add the Breadcrumbs from rank math?
If so, you don't need to use the Child theme for that.
You can add it through a Hook Element: https://docs.generatepress.com/article/hooks-element-overview/
See this article for assistance: https://docs.generatepress.com/article/adding-breadcrumbs/
The Rankmath shortcode as per their article is: [rank_math_breadcrumb]
many thanks! That works just fine
You're welcome, Dani!
