• Mahesh

    (@maheshpunhani)


    Hi!
    I output a search using the shortcode on the mobile below the logo. But the search result is showing like the posts instead of the products. The settings are already done in the customizer and it works fine on the desktop. But not on the mobile.

    Help me, please.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @maheshpunhani,

    Unfortunately, this feature is not available on OceanWP theme. The search function in the theme will include all content on the whole website, but for customized searching, you can search in WordPress repository to find a plugin to do this: https://www.ads-software.com/plugins/.

    Regarding the search icon on the mobile, please add this Custom CSS and JS in its respective area and Custom JS in the field below it, and let me know how it works:

    Custom CSS:

    /* DropDown and Overlay */
    #icon-searchform-dropdown.enable-manually,
    #icon-searchform-overlay.enable-manually {
        display: block;
        visibility: visible;
        opacity: 1;
        -moz-opacity: 1;
        -webkit-opacity: 1;
    }

    Custom JS:

    jQuery(document).ready(function($) {
        /* DropDown */
        $( ".oceanwp-mobile-menu-icon .search-icon-dropdown" ).click(function() {
            $( this ).parents().eq(2).find(".search-style-dropdown").toggleClass( "enable-manually" );
        });
        /* Overlay */
        $( ".oceanwp-mobile-menu-icon .search-icon-overlay" ).click(function() {
            $( this ).parents().eq(2).find(".search-style-overlay").toggleClass( "enable-manually" );
        });
        $(".search-style-overlay .search-overlay-close").click(function() {
            $( this ).parents().eq(3).find(".search-style-overlay").removeClass( "enable-manually" );
        });
    });

    Note: For more information about the CSS and JS code on the customizer, please read this link:
    https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website

    Best Regards

    • This reply was modified 2 years, 4 months ago by Shahin.
    Thread Starter Mahesh

    (@maheshpunhani)

    Hi Shahin,

    Thanks for the response.

    I think I am not able to explain my issue. I am using [oceanwp_search] shortcode to display a search form but it is not respecting the search settings in the customizer. It works fine with the header search but not with the shortcode that oceanwp provides.

    Or are you saying that the shortcode has been built in a way that it will not work like that and I will have to find a plugin for the same?

    Thanks
    Mahesh

    Hello @maheshpunhani,

    Yes, unfortunately this shortcode “[oceanwp_search]” will not work with the customizer; and you can search in WordPress repository to find a plugin to do this: https://www.ads-software.com/plugins/.

    Best Regards

    Thread Starter Mahesh

    (@maheshpunhani)

    Thanks for the confirmation. I found the plugin and it is working fine. I am using Premmerce Product Search for WooCommerce

    You’re welcome.
    I’m glad it is solved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Product search not working on mobile’ is closed to new replies.