[Resolved] display header above primary navigation

Home Forums Support [Resolved] display header above primary navigation

Home Forums Support display header above primary navigation

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.4
    #658737
    David
    Staff
    Customer Support

    Hi 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/

    #658779
    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

    #658847
    David
    Staff
    Customer Support

    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

    #659066
    colin

    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

    #659069
    David
    Staff
    Customer Support

    Hi Colin, You’re welcome, yes i think thats a topic best raised with wpdatatables 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.