Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › header.php integration
- This topic has 4 replies, 2 voices, and was last updated 10 years, 11 months ago by
Marcel Wiedmer.
-
AuthorPosts
-
June 12, 2015 at 11:14 am #4976
Marcel Wiedmer
Participanti’ve tried to add searchbox in my header.php but, it did not appear with shortcodes in header.php. I’ve added:
<div class=”primarymenu menuwrap”>
<?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=4]‘); ?>
</div>Please check here: http://inappixcom.staging.wpengine.com/domains/
I’ve checked your online documentation here:
http://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/getting_started/search_shortcode_in_themes.html
But nothing helps.I see the code in sourcecode, but not the form.
So, what shall i do?
June 12, 2015 at 11:22 am #4977Ernest Marcinko
KeymasterHi!
I can’t see the plugin files included in the header (scripts, stylesheets, inline script declarations).
It looks like the plugin is deactivated, or the theme is missing the wp_head() function call in the header.php file.June 12, 2015 at 11:43 am #4978Marcel Wiedmer
ParticipantHi
Thank you for your fast support. Hhhmmm – I am not a PHP coder, but I’ve integrated your shortcode in header.php as you cann see on attached image.1.) I’ve found wp_head() in header.php line 119.
2.) Plugin is activated
3.) I’ve added shortcode as html in page (not in template), so you can see, that both variations are not working: http://inappixcom.staging.wpengine.com/domains/ – first code on top (black navigation) is code in template (do code). Second added with wysiwyg.If I copy/paste default WP search form, search form is working fine. Strange.
Thank you, Marcel
June 12, 2015 at 12:16 pm #4980Ernest Marcinko
KeymasterOkays, I have a few more questions though, please go through these:
1. Is the shortcode put after the wp_head() call?
2. Does the shortcode work in the content (post or page)?
3. If you put some other plugin shortcode to the header.php does it work?
4. If you put the shortcode to the footer.php, does it work?
5. If you switch the theme to default and put the shortcode to the header.php does it work?These will help me understand the problem, but it doesn’t look like is related to the plugin. The missing stylesheet and shortcode indicates a theme (or core) related problem, but we will see after you try the upper mentioned tests.
June 12, 2015 at 2:06 pm #4982Marcel Wiedmer
ParticipantThanks Ernest, I’ve found the issue my self. There is a template issue. On other pages, ASP works great!
Please close the ticket and have a great weekend.
Best, Marcel -
AuthorPosts
- You must be logged in to reply to this topic.