Site logo

[Resolved] Adding PHP line in the child theme?

Home Forums Support [Resolved] Adding PHP line in the child theme?

Home Forums Support Adding PHP line in the child theme?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2474421
    Dani

    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)

    #2474432
    Fernando
    Customer Support

    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]

    #2474642
    Dani

    many thanks! That works just fine

    #2475180
    Fernando
    Customer Support

    You’re welcome, Dani!

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