Issues About The header.php Location - by wayy634

This topic has 7 replies, 3 voices, and was last updated 3 years ago ago by Rose Tyler

  • Avatar: wayy634
    wayy634
    Participant
    October 28, 2021 at 03:02

    Hello there,

    Just as you know I have found the “THEME EDITOR” and already enabled it, however, when I try to apply the breadcrumbs code snippet rank math offered me, I could not find the header.php file that the Xstore template owns.

    Here come two images for you to check:

    The requirement of rank math need: https://gyazo.com/e8d877e182abccff1fa3ac009f2ba977

    What the theme editor really shows:
    https://gyazo.com/2a5135bbdc90cbbabd01dc36acb08a16

    Would you please kindly show me where can I find the header.php file so that I could apply that code snippet? Thanks in advance.

    I would be more appreciated if you guide me with video recording.

    Please, contact administrator
    for this information.
    6 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 28, 2021 at 12:50

    Hello,

    Child theme does not include any files from start, just styles.css and fucntions.php. If you need to overwrite any files there you could copy them from parent theme to child theme keeping the folder structure. Don’t copy files from the framework folder. If you need to overwrite function from file of the framework folder then copy only function to child theme functions.php and edit that according to your needs.

    About breadcrumbs. You can copy header.php file from parent theme to child theme but we don’t show breadcrumbs in the header.php. Breadcrumbs code is at xstore/templates/breadcrumbs.php Anyway you did not provide code that rank math gave you, you provided only comment.

    Provide us with code that developers gave you and explain in more details what exactly you want to change in the breadcrumbs to point you to right way.

    Regards

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 28, 2021 at 12:50

    Hello,

    Child theme does not include any files from start, just styles.css and fucntions.php. If you need to overwrite any files there you could copy them from parent theme to child theme keeping the folder structure. Don’t copy files from the framework folder. If you need to overwrite function from file of the framework folder then copy only function to child theme functions.php and edit that according to your needs.

    About breadcrumbs. You can copy header.php file from parent theme to child theme but we don’t show breadcrumbs in the header.php. Breadcrumbs code is at xstore/templates/breadcrumbs.php Anyway you did not provide code that rank math gave you, you provided only comment.

    Provide us with code that developers gave you and explain in more details what exactly you want to change in the breadcrumbs to point you to right way.

    Regards

    Avatar: wayy634
    wayy634
    Participant
    October 29, 2021 at 02:26

    Hi,

    Thanks for your quick response, and after reading that breadcrumbs guide, here are some steps that you need to know before installing that code snippet to the right place.

    No.1: I do not know whether the breadcrumbs has already or not been successfully added to our website if it has already been added, then please let me know, cause if too many various forms of different breadcrumbs are added to the website might cause a conflict. Or could you show me how can I detect whether the Xstore breadcrumbs has already been applied to my site or not?

    No.2: This code snippet should be added to the child theme.

    No.3: Then you should place the below code snippet to the single.php file or the header.php file. Either of that would be fine.

    Here comes the breadcrumbs code snippet:

    /**
     * Use the following code in your theme template files to display breadcrumbs:
     */
    <?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>

    No.4: Now since you mentioned that we have an independent file for breadcrumbs, “xstore/templates/breadcrumbs.php”, is it possible to put that code snippet directly on that file?

    No.5: Last but not least, since I am not quite good at coding; how can I know whether that breadcrumbs has been applied to my website or not.

    Looking forward to your reply, and I will be more appreciated it if you show me how to get that issue done.

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 29, 2021 at 15:56

    Hello,

    Provide us with FTP access to your site, please. Do you want to use these breadcrumbs for the whole site: posts, pages, products etc?

    Regards

    Avatar: wayy634
    wayy634
    Participant
    October 30, 2021 at 02:39

    Hi,

    Thanks for your quick response, however, right now, the FTP we have not activated yet, and all we have is SITEGROUND, therefore, I can not offer.

    And would you please show me how to use FTP to set that if I build one. Could you show me step by step by video recording or text?

    Just like you said, since Xstore has an independent file for breadcrumbs, “xstore/templates/breadcrumbs.php”, is it possible to put the below code snippet directly on that file?

    /**
     * Use the following code in your theme template files to display breadcrumbs:
     */
    <?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>

    And I want to use these breadcrumbs for the whole site.

    Looking forward to your early reply, thanks.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 30, 2021 at 15:25

    Hello,

    Check now – https://prnt.sc/1xu9l67

    Regards

  • Viewing 7 results - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.