• Resolved robertarch

    (@robertarch)


    Hi,
    I am using a child theme.
    I have managed to reduce the size of the site using the style.css and changing any max size 1190px to 860px. This works fine.
    The navbar is fine, but when I add some extra content in the header.php the extra content is floating over to the 1190px point. I am using float:right. I have put the extra content below:
    <header id=”masthead” class=”site-header” role=”banner”>
    I also notice that the footer is full page width, this may need changing to the 860px width.
    So the question is how do I set the header and footer width to 860px? Please note that the nav bar is showing at 860px.
    Any help with the problem would be greatly appreciated.
    Thanks
    Rob

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter robertarch

    (@robertarch)

    Update:
    I have added the extra content in base-wp -> inc -> assets -> template-functions.php just below the_custom_logo(); (line 11)
    ie echo ‘<div>some content</div>’;
    This works as it is now placed in the correct div – ‘<div class=”site-branding”>’.
    I really want to stick to using the child theme, but when I place the assets folder in the child theme and make the above changes in there instead of the parent, it does not recognise it.
    I added require get_template_directory() . ‘/inc/assets/template-functions.php’; to my functions.php but this throws an error
    Cannot redeclare igthemes_adjust_color_brightness() (previously declared in …. base-wp
    So this is now a problem of over-riding parent theme functions, I guess. There has to be an easier way.
    Cheers
    Rob

    Thread Starter robertarch

    (@robertarch)

    Update:
    Instead of using:
    require get_template_directory() . ‘/inc/assets/template-functions.php’;
    Use:
    get_stylesheet_directory_uri() . ‘/inc/assets/template-functions.php’;

    in the functions.php
    Problem solved

    Thread Starter robertarch

    (@robertarch)

    Problem solved

    Thread Starter robertarch

    (@robertarch)

    use the following in your child functions.php (don’t use the ones above):
    require_once( get_stylesheet_directory() . ‘/inc/assets/template-functions.php’);
    copy the assets folder to your child theme.
    the extra content goes in base-wp-child -> inc -> assets -> template-functions.php just below the_custom_logo(); (line 11)
    ie echo ‘<div>some content</div>’;
    I hope that explains it better
    Rob

    Theme Author iografica

    (@iografica)

    Glad to hear you have solved the problem, if you like the theme please help us rating it!
    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Add extra content to header’ is closed to new replies.