- This topic has 10 replies, 2 voices, and was last updated 9 years ago by Tom.
-
AuthorPosts
-
April 12, 2015 at 8:43 am #97919Larry 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 CunninghamTom
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 #97939TomLead 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 CunninghamThanks Tom. The navigation is below the header.
Larry
April 12, 2015 at 10:49 pm #98127TomLead 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 CunninghamHi 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 #98914TomLead 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 CunninghamApril 16, 2015 at 8:40 am #99097TomLead 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 CunninghamThanks Tom – that worked perfectly.
Larry
April 16, 2015 at 5:14 pm #99311TomLead DeveloperLead DeveloperYou’re welcome π
-
AuthorPosts
- You must be logged in to reply to this topic.