- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by
David.
-
AuthorPosts
-
August 24, 2018 at 1:30 am #658622
colin
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
GeneratePress 2.1.4August 24, 2018 at 5:12 am #658737David
StaffCustomer SupportHi there,
can you add the code to a child theme function or using or via the code snippets plugin.
https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 5:47 am #658779colin
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
August 24, 2018 at 7:17 am #658847David
StaffCustomer SupportHi Colin,
theres a lot more conditional tags you can use:
https://codex.wordpress.org/Conditional_TagsIf the requests for this option grows it may end up as a nav location for elements 😉
Glad i could be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 10:21 am #659066colin
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
August 24, 2018 at 10:27 am #659069David
StaffCustomer SupportHi Colin, You’re welcome, yes i think thats a topic best raised with wpdatatables 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.