• Resolved alchemidesign

    (@alchemidesign)


    Hi there!

    So I’m having an issue accessing the header.php file to get to the <head> tag through a child theme version of Page Builder Framework.

    I downloaded a child theme from Page Builder Framework’s website and I realized there was no “Theme Editor” option inside the WordPress dashboard. I went into my cPanel to see if I could find it in the theme files, and there is no header.php or footer.php in the child theme files.

    I checked the parent theme files and I found the header.php and footer.php files, among others that are not present in the child theme.

    I also tried using a child theme configurator plugin to create a new child theme from the parent Page Builder Framework to see if I could retain header.php that way, but that did not work either.

    Please let me know how I can find these files. Thanks!

    • This topic was modified 5 years, 3 months ago by alchemidesign.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author David Vongries

    (@davidvongries)

    Hi @alchemidesign,

    You can simply use a hook to insert code to the <head> tag of your website. Here’s an example:

    function your_prefix_function() {
        echo 'Lorem Ipsum'; 
    } 
    add_action( 'wp_head', 'your_prefix_function' );

    This code would go into your child-theme’s functions.php.

    The child theme doesn’t have it’s own header/footer files. You could move the theme’s header to the child theme and make your changes there but I think in your case, using a hook is the better choice.

    Do you have a security issue installed? We don’t hide the “Theme Editor” but some security plugins (and even webhosts) do that for security reasons.

    Please let me know if that would work for you. If you try to achieve something different, please let me know.

    Best,
    David

    Thread Starter alchemidesign

    (@alchemidesign)

    Hi David,

    Thanks for suggesting the security plugin–iThemes security was blocking my access. I’ve deactivated it for the time being.

    Regarding the hook, I haven’t used a hook before to add code. The line of code I’m trying to add is from Adobe fonts:

    <link rel="stylesheet" href="https://use.typekit.net/por1bmp.css">

    How would that be placed into the hook?

    Thanks!

    Theme Author David Vongries

    (@davidvongries)

    Hi @alchemidesign,

    Please try this:

    function your_prefix_function() {
        echo '<link rel="stylesheet" href="https://use.typekit.net/por1bmp.css">'; 
    } 
    add_action( 'wp_head', 'your_prefix_function' );

    PS: Our Premium Add-On actually comes with a Typekit/Adobe Fonts integration ??

    Quick Demo Video – https://www.youtube.com/watch?v=qII-SDZzvD8
    Premium Features – https://wp-pagebuilderframework.com/premium/

    Please let me know if you have any further questions.

    Best,
    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to access header.php for head tag?’ is closed to new replies.