Site logo

Archived topic

display header above primary navigation

5 replies · Started by colin on August 24, 2018

Viewing posts 1–6 of 6

Hi

I am running my system on localhost only at present (uploading soon) http://www.dividendmanager.co.uk

I have used the code below using GP Elements Hook (before_header) to position my header above the primary navigation. It all works except the code is echoed in the header area at the point of execution, how can I remove the debug of the code display on the webpage. I cannot see an option to turn off debug.

https://generatepress.com/forums/topic/page-header-image-above-menu/page/2/

add_action( ‘after_setup_theme’,’craig_move_navigation’ );
function craig_move_navigation() {
if ( is_front_page () ) {
remove_action( ‘generate_after_header’, ‘generate_add_navigation_after_header’, 5 );
add_action( ‘generate_after_header’, ‘generate_add_navigation_after_header’, 15 );
}
}

Many Thanks

Colin

Hi David

Many thanks for your quick response, I have applied your suggestion using snippets and it works !!

However, its display options are very limited in restricting where the hook is used compared to GP elements, being only 4 options, so it would be preferable to be able to use the GP elements in future if I could suppress the echo of the code in the area of execution, but great to have a fix so quickly.

Many Thanks

Colin

Hi Colin,

theres a lot more conditional tags you can use:
https://codex.wordpress.org/Conditional_Tags

If the requests for this option grows it may end up as a nav location for elements ;)

Glad i could be of help

Hi David

Many thanks for the extra information, I will certainly use this documentation in creating other hooks.

I need to perform some hooks, procedures in using wpDataTables, .e.g say when adding a header record of monthly direct debits ( code, description, date_start, date_end, frequency ( (A)nnual, (M)onthly, (W)eekly, (D)aily, etc ), amount ) I need to insert a schedule record for each monthly payment,

e.g., direct debit code, description, date, amount for each date between date_start and start_end

I assume I would use the Actions hooks below, a question for wpDataTables support I think ??

https://wpdatatables.com/documentation/information-for-developers/hooks/

Many Thanks for your help

Colin

Hi Colin, You're welcome, yes i think thats a topic best raised with wpdatatables :)

This archived topic is closed to new replies.