possibility to have a shortcode for search
-
Hey @hdcms,
Yes, It is possible to search the shortcodes.
Hello
what is your shortcode to you?Hey @hdcms
I think I misunderstood you at first! So, BuddyPress Global Search does not have a shortcode for displaying searchbox.
Hello,
I do not understand. Your plugiun and my shortcode works well on the test site but not on the production site. I checked the plugins and selected the same search fields for the members.
The search field appears for one second and then disappears.I do not see any difference and I have nothing in debug.log
If you have an idea, it would allow me to use your pluginRegards
add_shortcode('display_search_form', 'rech_globale_bp'); function rech_globale_bp() { //if (is_user_logged_in()) { $bp_loggedin_user_id = bp_loggedin_user_id(); $user_info = get_userdata($bp_loggedin_user_id); $user_roles = isset($user_info->roles)?$user_info->roles:array(); $output =''; if ( is_super_admin() OR in_array('membre2', $user_roles) ) { $search_form = '<form role="search" method="get" action="'. esc_url(home_url('/')) .'"> <input value="" name="s" id="s" placeholder="Saisissez un terme" class="ui-autocomplete-input" autocomplete="off" type="text"> <input name="searchsubmit" id="searchsubmit" value="true" type="hidden"></form>'; } else $search_form ='Passez à un plan supérieur '; return $search_form; // } }
Hey @hdcms,
Perhaps some css or js might have been blocking out the search field on your production site.
Hi @bbwpsupport
Thank you for your prompt response ??
I uninstalled and reinstalled the plugin. Same problem
I do not see any conflict with jquery-ui
*************
There are other jquery:<script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/position.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/menu.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.11.4'></script> </head> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/mouse.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/sortable.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4'></script> <script type='text/javascript' data-cfasync="false" src='https://www.on.eu/wp-includes/js/jquery/ui/effect-slide.min.js?ver=1.11.4'></script>
***********************
Is there a way to move it to the end or somewhere else?
Regards<link rel='stylesheet' id='invite-anyone-widget-style-css' href='https://www.on.eu/wp-content/plugins/invite-anyone/widgets/widgets-css.css' type='text/css' media='all' /> <link rel='stylesheet' id='otw_sbm.css-css' href='https://www.on.eu/wp-content/plugins/sidebar-manager-light/css/otw_sbm.css?ver=4.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='bp-mentions-css-css' href='https://www.on.eu/wp-content/plugins/buddypress/bp-activity/css/mentions.min.css?ver=2.9.3' type='text/css' media='all' /> <link rel='stylesheet' id='bp-parent-css-css' href='https://www.on.eu/wp-content/themes/woffice/css/buddypress.css?ver=2.9.3' type='text/css' media='screen' /> <link rel='stylesheet' id='evcal_google_fonts-css' href='//fonts.googleapis.com/css?family=Oswald:400,300|Open+Sans:700,400,400i|Roboto:700,400' type='text/css' media='screen' /> <link rel='stylesheet' id='evcal_cal_default-css' href='//www.on.eu/wp-content/plugins/eventON/assets/css/eventon_styles.css' type='text/css' media='all' /> <link rel='stylesheet' id='evo_font_icons-css' href='//www.on.eu/wp-content/plugins/eventON/assets/fonts/font-awesome.css' type='text/css' media='all' /> <link rel='stylesheet' id='eventon_dynamic_styles-css' href='//www.on.eu/wp-content/plugins/eventON/assets/css/eventon_dynamic_styles.css' type='text/css' media='all' /> <link rel='stylesheet' id='mycred-front-css' href='https://www.on.eu/wp-content/plugins/mycred/assets/css/mycred-front.css' type='text/css' media='all' /> <link rel='stylesheet' id='bkb-font-awesome-styles-css' href='https://www.on.eu/wp-content/plugins/bwl-kb-manager/css/font-awesome.min.css?ver=1.2.0' type='text/css' media='all' /> <link rel='stylesheet' id='jquery-ui-search-css' href='https://www.on.eu/wp-content/plugins/buddypress-global-search/assets/css/jquery-ui.min.css?ver=1.11.2' type='text/css' media='all' /> <link rel='stylesheet' id='buddypress-global-search-css' href='https://www.on.eu/wp-content/plugins/buddypress-global-search/assets/css/buddypress-global-search.min.css?ver=1.1.8' type='text/css' media='all' /> <link rel='stylesheet' id='theme-fonts-css' href='//fonts.googleapis.com/css?family=Lato:100,200,300,400,400italic,600,700italic,800,900|Lato:100,200,300,400,400italic,600,700italic,800,900' type='text/css' media='all' /> <link rel='stylesheet' id='assets-css-css' href='https://www.on.eu/wp-content/themes/woffice/css/assets.min.css?ver=1.0' type='text/css' media='all' /> <link rel='stylesheet' id='woffice-theme-style-css' href='https://www.on.eu/wp-content/themes/woffice/style.css?ver=4.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='woffice-printed-style-css' href='https://www.on.eu/wp-content/themes/woffice/css/print.min.css?ver=1.0' type='text/css' media='print' /> <link rel='stylesheet' id='buttons-css' href='https://www.on.eu/wp-includes/css/buttons.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='dashicons-css' href='https://www.on.eu/wp-includes/css/dashicons.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='mediaelement-css' href='https://www.on.eu/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='wp-mediaelement-css' href='https://www.on.eu/wp-includes/js/mediaelement/wp-mediaelement.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='media-views-css' href='https://www.on.eu/wp-includes/css/media-views.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='imgareaselect-css' href='https://www.on.eu/wp-includes/js/imgareaselect/imgareaselect.css' type='text/css' media='all' /> <link rel='stylesheet' id='woffice-child-stylesheet-css' href='https://www.on.eu/wp-content/themes/woffice-amours/style.css?ver=4.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='cp-module-main-style-css' href='https://www.on.eu/wp-content/plugins/convertplug/modules/assets/css/cp-module-main.css?ver=4.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='smile-modal-style-css' href='https://www.on.eu/wp-content/plugins/convertplug/modules/modal/assets/css/modal.min.css?ver=4.9.4' type='text/css' media='all' /> <link rel='stylesheet' id='rt-mediaelement-css' href='https://www.on.eu/wp-content/plugins/buddypress-media/lib/media-element/mediaelementplayer-legacy.min.css?ver=4.4.5' type='text/css' media='all' /> <link rel='stylesheet' id='rt-mediaelement-wp-css' href='https://www.on.eu/wp-content/plugins/buddypress-media/lib/media-element/wp-mediaelement.min.css?ver=4.4.5' type='text/css' media='all' /> <link rel='stylesheet' id='rtmedia-main-css' href='https://www.on.eu/wp-content/plugins/buddypress-media/app/assets/css/rtmedia.min.css?ver=4.4.5' type='text/css' media='all' />
-
This reply was modified 7 years ago by
Steven Stern (sterndata).
Hi @bbwpsupport
Thank you for your prompt response ??
I uninstalled and reinstalled the plugin. Same problem
I do not see any conflict with jquery-ui
*************
There are other jquery:
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/jquery.js?ver=1.12.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/position.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/menu.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.11.4′></script>
</head><script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/mouse.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/sortable.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4′></script>
<script type=’text/javascript’ data-cfasync=”false” src=’https://www.on.eu/wp-includes/js/jquery/ui/effect-slide.min.js?ver=1.11.4′></script>***********************
Is there a way to move it to the end or somewhere else?
Regards<link rel=’stylesheet’ id=’invite-anyone-widget-style-css’ href=’https://www.on.eu/wp-content/plugins/invite-anyone/widgets/widgets-css.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’otw_sbm.css-css’ href=’https://www.on.eu/wp-content/plugins/sidebar-manager-light/css/otw_sbm.css?ver=4.9.4′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’bp-mentions-css-css’ href=’https://www.on.eu/wp-content/plugins/buddypress/bp-activity/css/mentions.min.css?ver=2.9.3′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’bp-parent-css-css’ href=’https://www.on.eu/wp-content/themes/woffice/css/buddypress.css?ver=2.9.3′ type=’text/css’ media=’screen’ />
<link rel=’stylesheet’ id=’evcal_google_fonts-css’ href=’//fonts.googleapis.com/css?family=Oswald:400,300|Open+Sans:700,400,400i|Roboto:700,400′ type=’text/css’ media=’screen’ />
<link rel=’stylesheet’ id=’evcal_cal_default-css’ href=’//www.on.eu/wp-content/plugins/eventON/assets/css/eventon_styles.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’evo_font_icons-css’ href=’//www.on.eu/wp-content/plugins/eventON/assets/fonts/font-awesome.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’eventon_dynamic_styles-css’ href=’//www.on.eu/wp-content/plugins/eventON/assets/css/eventon_dynamic_styles.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’mycred-front-css’ href=’https://www.on.eu/wp-content/plugins/mycred/assets/css/mycred-front.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’bkb-font-awesome-styles-css’ href=’https://www.on.eu/wp-content/plugins/bwl-kb-manager/css/font-awesome.min.css?ver=1.2.0′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’jquery-ui-search-css’ href=’https://www.on.eu/wp-content/plugins/buddypress-global-search/assets/css/jquery-ui.min.css?ver=1.11.2′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’buddypress-global-search-css’ href=’https://www.on.eu/wp-content/plugins/buddypress-global-search/assets/css/buddypress-global-search.min.css?ver=1.1.8′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’theme-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:100,200,300,400,400italic,600,700italic,800,900|Lato:100,200,300,400,400italic,600,700italic,800,900′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’assets-css-css’ href=’https://www.on.eu/wp-content/themes/woffice/css/assets.min.css?ver=1.0′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’woffice-theme-style-css’ href=’https://www.on.eu/wp-content/themes/woffice/style.css?ver=4.9.4′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’woffice-printed-style-css’ href=’https://www.on.eu/wp-content/themes/woffice/css/print.min.css?ver=1.0′ type=’text/css’ media=’print’ />
<link rel=’stylesheet’ id=’buttons-css’ href=’https://www.on.eu/wp-includes/css/buttons.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’dashicons-css’ href=’https://www.on.eu/wp-includes/css/dashicons.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’mediaelement-css’ href=’https://www.on.eu/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’wp-mediaelement-css’ href=’https://www.on.eu/wp-includes/js/mediaelement/wp-mediaelement.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’media-views-css’ href=’https://www.on.eu/wp-includes/css/media-views.min.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’imgareaselect-css’ href=’https://www.on.eu/wp-includes/js/imgareaselect/imgareaselect.css’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’woffice-child-stylesheet-css’ href=’https://www.on.eu/wp-content/themes/woffice-amours/style.css?ver=4.9.4′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’cp-module-main-style-css’ href=’https://www.on.eu/wp-content/plugins/convertplug/modules/assets/css/cp-module-main.css?ver=4.9.4′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’smile-modal-style-css’ href=’https://www.on.eu/wp-content/plugins/convertplug/modules/modal/assets/css/modal.min.css?ver=4.9.4′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’rt-mediaelement-css’ href=’https://www.on.eu/wp-content/plugins/buddypress-media/lib/media-element/mediaelementplayer-legacy.min.css?ver=4.4.5′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’rt-mediaelement-wp-css’ href=’https://www.on.eu/wp-content/plugins/buddypress-media/lib/media-element/wp-mediaelement.min.css?ver=4.4.5′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’rtmedia-main-css’ href=’https://www.on.eu/wp-content/plugins/buddypress-media/app/assets/css/rtmedia.min.css?ver=4.4.5′ type=’text/css’ media=’all’ />Hi @bbwpsupport
Thank you for your prompt response ??
I uninstalled and reinstalled the plugin. Same problem
It does not seem to me that it comes from the css because I put a specific id
I do not see any conflict with jquery-ui
I posted a response over 2 days but waiting. I imagine because of the links.
I would like to show you the files via https://pastebin.com/zue4WkR2Thank you for your help because I can not use your plugin
Hey @hdcms,
Can you please run a compatibility test for me? You can do it by deactivating all the other plugins and then activate them one by one to find out the conflicting plugin. It will help us further debug the issue.
Hello @bbwpsupport
Thank you for your reply. I have just sent a mailing to several thousand people. It is therefore difficult currently to disable all active plugins (35).
Is there another way to disable your javascript or move it to the end (even if I do not see a duplicate)
RegardsHey @hdcms
You can use
wp_dequeue_scripts
function to disable BuddyPress Global Search plugin’s javascript files.e.x:
/** * Dequeue the Global Search scripts */ function global_search_dequeue_script() { wp_dequeue_script( 'jquery-ui-autocomplete' ); wp_dequeue_script( 'buddypress-global-search' ); } add_action( 'wp_print_scripts', 'global_search_dequeue_script', 100 );
OR
You can try Scripts To Footer plugin to move all scripts to the footer area.
-
This reply was modified 7 years ago by
BuddyBoss Support.
Hello @bbwpsupport
I put the add_action in functions.php and then I tested the plugin
No improvement. The search field disappears at the end of the page load.
It’s weird because on the site terst or I put the same plugins, it works
I keep looking.
If you have another proposal!
Thank you for your patience
RegardsHey @hdcms,
As the search is working fine on test website, There must be something at hosting server that might be preventing the JQuery to work. Are your test website and live website is on the same server? Check with your hosting provider.
Can you check if there is any error or indication regarding search related or JQuery issue in your server error log. Check for error_log file in file manager.
Also provide us website URL so we can take a closer look into it.
Regards
-
This reply was modified 7 years ago by
- The topic ‘possibility to have a shortcode for search’ is closed to new replies.