[Resolved] My live page doesn’t look the same like in editor

Home Forums Support [Resolved] My live page doesn’t look the same like in editor

Home Forums Support My live page doesn’t look the same like in editor

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #1546476
    David
    Staff
    Customer Support

    oooh … ok – its never a good idea to edit the parent theme files, aside of things going a bit weird any changes you make will be overwritten when the theme is updated.

    Could you remove those changes ?

    We can help with adding the code without editing theme files afterwards ๐Ÿ™‚

    #1546490
    Violeta

    Both removed and it looks like that was a problem.

    As I said I’m pretty new to WP, but on my previous site that I ran on a different theme I used theme editor to add codes.

    Anyways, I am so happy we found the problem.:)

    I guess I will activate my plugins now. And can you please help me to add the codes for Google Analytics and Skimlinks back? As well, I would like to know how to add codes without editing the theme for the future.

    #1546516
    David
    Staff
    Customer Support

    Phew…. glad that resolved it – And no problems, theres a lot of nuances with WP and different Themes ๐Ÿ™‚

    Yep, you can re-activate your plugins.

    Ok adding code to the themes templates such as the Header or the Footer, you can use the Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    1. Go to Appearance > Elements.
    2. Create a new Hook element
    3. Insert your code
    4. Select the Hook where you need to add the code, options:

    a. wp_head – insert inside the <header> tags
    b. wp_footer – insert into footer – immediately before the closing </body> tag
    c. wp_body_open – insert immediately after the opening <body> tag

    5. Set the elements Display Rule Locations to Entire Site

    I would recommend creating a separate Hook for each script you want to add, even if they are using the same hook, makes it easier to debug if one code is not working.

    For other codes like PHP snippets, that you may be tempted to add to the themes functions.php, we explain how in this article:

    https://docs.generatepress.com/article/adding-php/

    CSS best place for it unless you’re adding a lot ( 100’s of lines ) is in the Customizer > Additional CSS. You may find some already in there that came with the Site Library import

    #1546768
    Violeta

    David, all done. Codes have been added to the hook elements.

    Thank you so much for all of your help!

    #1549054
    David
    Staff
    Customer Support

    Happy to be of help!

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.