- This topic has 10 replies, 2 voices, and was last updated 8 years, 5 months ago by
Tom.
-
AuthorPosts
-
April 12, 2015 at 8:43 am #97919
Larry Cunningham
Hi Tom
What is the easiest method of increasing the height of the header container?
Also can I get the header image to cover both the header container and the navigation.
Thanks
Larry
April 12, 2015 at 9:26 am #97924Larry Cunningham
Tom
I’ve used Elemental spacing to adjust the height of the header and this seems to work.
I’d still be interested to know if there is an easy way to combine the background image of the header with that of the navigation.
Thanks
Larry
April 12, 2015 at 11:20 am #97939Tom
Lead DeveloperLead DeveloperHi Larry,
You can use a PHP function to move the navigation inside the header.
Is your header currently below or above the header?
Let me know π
April 12, 2015 at 1:16 pm #97979Larry Cunningham
Thanks Tom. The navigation is below the header.
Larry
April 12, 2015 at 10:49 pm #98127Tom
Lead DeveloperLead DeveloperGive this PHP a try:
add_action('after_setup_theme','generate_move_navigation_inside_header'); function generate_move_navigation_inside_header() { remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 ); add_action( 'generate_after_header_content', 'generate_add_navigation_after_header', 5 ); }
Here’s how to add your own PHP: http://generatepress.com/knowledgebase/adding-php-functions/
April 15, 2015 at 1:11 pm #98811Larry Cunningham
Hi Tom
Have tried creating the plugin as the site is on WordPress.org and get a fatal error!
This the message:
Parse error: syntax error, unexpected T_FUNCTION in /websites/123reg/LinuxPackage22/sa/ll/yg/sallygardinerceramics.co.uk/public_html/wp-content/plugins/navigation-in-header/navigation-in-header.php on line 13
and this is the script:
<?php
/*
Plugin Name: Navigation in header
Plugin URI:
Description:
Version:
Author:
Author URI:
License:
License URI:
*/
add_action('after_setup_theme','generate_move_navigation_inside_header');
function generate_move_navigation_inside_header()
{
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header_content', 'generate_add_navigation_after_header', 5 );
}Any suggestions? I am new to adding php so it could easily be some very basic error on my part.
Thanks
Larry
April 15, 2015 at 10:22 pm #98914Tom
Lead DeveloperLead DeveloperSorry for not getting back to you sooner!
I’m not spotting anything wrong..
Can you try pasting the content of the plugin to this site, and then linking me to the paste?: http://pastebin.com/
Let me know π
April 16, 2015 at 12:16 am #98926Larry Cunningham
April 16, 2015 at 8:40 am #99097Tom
Lead DeveloperLead DeveloperYea, what I thought – the apostrophes were converted into HTML strings.
Try this: http://pastebin.com/MepTNsNf
April 16, 2015 at 12:12 pm #99230Larry Cunningham
Thanks Tom – that worked perfectly.
Larry
April 16, 2015 at 5:14 pm #99311Tom
Lead DeveloperLead DeveloperYou’re welcome π
-
AuthorPosts
- You must be logged in to reply to this topic.