Title: PHP Installation
Last modified: February 18, 2024

---

# PHP Installation

 *  Resolved [flamey23](https://wordpress.org/support/users/flamey23/)
 * (@flamey23)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/)
 * Hello,
   I am following the e-commerce tutorial on how to create a store with woo
   commerce:[https://www.youtube.com/watch?v=zE9BiBebFMI](https://www.youtube.com/watch?v=zE9BiBebFMI)
   I am adding the advanced woo search plugin by ilid.This is where it gets a bit
   complicated so bear with me:)I want the search bar to be after my navbar in the
   header.Once the plugin is activated,it says it is to be added to a webpage by
   adding short code to the header via the customiser within the html element.However,
   I am using the Blocksy theme. I already have a html element in the header already,
   and cannot add a second html element.So I am thinking of adding the search bar
   with php using wpcode for the code snippets. I installed wpcode snippets to add
   php code to the header, but do not know the correct way to add php to the header
   via wpcode, and to position it correctly.I have searched everywhere for code,
   but cannot find it anywhere.Any help with how to add this advanced woo search
   to the header with php via wpcode would be so gratetful. Been stuck on this for
   ages!
    -  This topic was modified 2 years, 1 month ago by [flamey23](https://wordpress.org/support/users/flamey23/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-installation-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [ILLID](https://wordpress.org/support/users/mihail-barinov/)
 * (@mihail-barinov)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/#post-17438870)
 * Hi,
 * Please read [this article](https://advanced-woo-search.com/guide/how-to-add-search-form-to-the-navigation-menu/).
   Perhaps it will help to solve your problem.
 * Regards
 *  Thread Starter [flamey23](https://wordpress.org/support/users/flamey23/)
 * (@flamey23)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/#post-17441172)
 * Hello!
 * Thank you for reply. Unfortunately the link leads to a blank web page.
 * I am wondering if maybe I need to use things called hooks to activate the plug?
   I cannot find any code to activate things like shortcode. I am new to wp and 
   coding. I am wondering if there is ja simple way to add content to the header
   using wpcode snippets.
 *  Thread Starter [flamey23](https://wordpress.org/support/users/flamey23/)
 * (@flamey23)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/#post-17441266)
 * I have added the following to activate the shortcode and the search bar now appears:
 *     ```wp-block-code
       <?php
       function custom_header_code() {
           ?>
          <?php echo do_shortcode( '[aws_search_form]' ); ?>
   
           <?php
       }
       add_action( 'wp_nav_menu', 'custom_header_code' );
       ?>
       ```
   
 * However, it is making my navbar disappear. I want to add the search bar after
   the navigation bar row. Is there a hook after elements such as the navbar? It
   needs to be in the main row-not the top or bottom header rows. Is there a way
   of defining which row? Can the search element be accessed via css?
    -  This reply was modified 2 years, 1 month ago by [flamey23](https://wordpress.org/support/users/flamey23/).
    -  This reply was modified 2 years, 1 month ago by [flamey23](https://wordpress.org/support/users/flamey23/).
    -  This reply was modified 2 years, 1 month ago by [flamey23](https://wordpress.org/support/users/flamey23/).
 *  Plugin Author [ILLID](https://wordpress.org/support/users/mihail-barinov/)
 * (@mihail-barinov)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/#post-17446240)
 * Please check [this article](https://advanced-woo-search.com/guide/how-to-add-search-form-to-the-navigation-menu/)
   one more time. Now it must be working fine.
 * You can use the following code snippet from the article to place the search form
   after the nav bar:
 *     ```wp-block-code
       add_filter( 'wp_nav_menu', 'my_wp_nav_menu', 10, 2 );
       function my_wp_nav_menu( $nav_menu, $args ) {
           $aws_form = aws_get_search_form( false );
           $nav_menu = $nav_menu . $aws_form;
           return $nav_menu;
       }
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Installation’ is closed to new replies.

 * ![](https://ps.w.org/advanced-woo-search/assets/icon-256x256.png?rev=3303984)
 * [Advanced Woo Search - Product Search for WooCommerce](https://wordpress.org/plugins/advanced-woo-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-woo-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-woo-search/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-woo-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-woo-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-woo-search/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [woo commerce](https://wordpress.org/support/topic-tag/woo-commerce/)

 * 6 replies
 * 2 participants
 * Last reply from: [ILLID](https://wordpress.org/support/users/mihail-barinov/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/php-installation-2/#post-17446240)
 * Status: resolved