Support » Plugin: Shortcodes and extra features for Phlox theme » Search button in header is hidden for each postpage

  • Resolved Tim de Hoog

    (@tim_nl)


    By default the search button in the header main menu is hidden.

    In the file:
    /auxin/auxin-include/include/templates/templates-header.php

    You will find the function:
    auin_get_header_layout()

    In this function you will find this piece of code:

    
        if ( 'default' === $add_search = auxin_get_post_meta( $post, 'page_header_search_button' ) ) {
            $add_search    = auxin_get_option( 'site_header_search_button' );
        }
    

    But the function auxin_get_post_meta( $post, ‘page_header_search_button’ ) will return null because this option doesn’t exist. You can’t set in in the wp-admin section. The if statement will fail and the default value of $add_search = false will be used.

    Solution:
    Add option to toggle the search button per blog in wp-admin or check the return value correctly so that $add_search = auxin_get_option( ‘site_header_search_button’ ); will be used.

    Thank you.

    Tim from Timdehoog.nl

    • This topic was modified 2 years, 5 months ago by Tim de Hoog.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search button in header is hidden for each postpage’ is closed to new replies.