• Resolved valentinsimeonov

    (@valentinsimeonov)


    Hello! I’m using the MH Magazine lite theme.

    I would like to put a feature box on my blog, so I installed and activated Plugmatter Feature Box. I need to add a code to the header.php. The instructions say that I have to go to Appearance -> Editor -> Header -> Put the code at the end of line.

    When I go to Editor though there is no header.php but Templates – theme functions and Styles – stylesheet and rtl stylesheet.

    Can you tell me then where exactly should I paste the code so that it will appear just underneath the site name and menu as a feature box?

    I already tried pasting it at the end of line theme functions but the box appeared above the header.

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi valentinsimeonov,

    thanks for using MH Magazine lite.

    The instructions say that I have to go to Appearance -> Editor -> Header -> Put the code at the end of line.

    That is being considered as bad practice because whenever you edit core theme files, these changes will be lost after theme updates. Instead you could create a custom child theme, copy the files header.php and/or content-header.php to your child theme and customize the files according to your personal requirements.

    It’s also important to check what exactly the instructions in the plugin documentation say, because if it’s required to add code to the <head>-section of your website, you could simply achieve that with a plugin as well: Head & Footer Code.

    Thread Starter valentinsimeonov

    (@valentinsimeonov)

    Hello!

    Yes, well according to the instructions:

    “1. Go to: WordPress → Appearance → Editor → Header → Go to the End if the file
    2. Copy and paste the above code snippet at the end of the header.php file as shown in the screenshot above.”

    It isn’t said head section just in the header because it is a feature box. The thing is that nowhere in the theme under editor I see header.php or content-header.php as you mention above. There are just these three theme functions and stylesheet and rtl stylesheet. That’s why I though that maybe you can tell me where should I put such a code.

    Thank you!

    What’s the link to your website so that we can see what theme version you are using?

    Still, you really shouldn’t modify core theme files because these changes will be lost after theme updates. The plugin developers either don’t know that or they don’t care, otherwise they probably wouldn’t give instructions to edit theme files directly without a child theme. ??

    Thread Starter valentinsimeonov

    (@valentinsimeonov)

    Thank you for the advice though!

    My blog is in coming soon mode but here’s the link https://vshealthandfitness.com/

    Can you please disable the coming soon mode so that we can see your website?

    If you don’t want to disable the coming soon mode, you can also let us know what theme you have activated when you click on Appearance => Themes in your WordPress dashboard.

    Thread Starter valentinsimeonov

    (@valentinsimeonov)

    No, it’s fine, the blog is up now ??

    Thanks, you’re actually using the MH TechMagazine theme which is a free child theme for MH Magazine lite. That also explains why you don’t have the mentioned files in your theme.

    What you could do is either create a custom child theme for MH Magazine lite and then apply your customizations (will be preserved after theme updates) or you could copy and paste the files header.php and/or content-header.php from MH Magazine lite to your MH TechMagazine theme and then customize the files accordingly. However, please be aware that if you edit the MH TechMagazine theme, these changes will be lost after theme updates for MH TechMagazine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Where to insert code for Pluggmatter FeatureBox’ is closed to new replies.