• Resolved ottjobs


    When I type in a search, for example, “Painting Bag” The font size for the description is way too small for a normal person to read. I don’t know how to change that. I use Elementor. I’m not a coder at all, so if I need to change Custom CSS please show me exactly how if you can.

    Note: Find the search in place in the red area. The red area was temporarily inserted into the page for the purpose of this question, the actual page I am putting it in requires login access.

    Bonus question: This is a search for employees to locate item SKU’s. I need them to be able to search for the name, and then be able to read the description and SKU. I can’t figure out how to include the SKU in the search results either. I am going to resort to including the SKU in the description for now.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople


    Hello @ottjobs

    Thank you so much for using our plugin. Some styles are inherited from the theme active on your WordPress.

    To increase the font-size, please, go to the menu option: “Appearance > Customize > Additional CSS”, and enter the style definition below:

    .search-in-place .resume{font-size:14px !important;}

    Since, you use SiteGround cache, it is recommended to purge the website’s cache after modifying the style.

    To include additional attributes in the search results, you need some custom coding. You can use the following piece of code as part of the function.php file of the theme active on your WordPress:

    add_filter('search-in-page-item', function($obj, $id){
        global $wpdb;
        $sku = $wpdb->get_var(
            $wpdb->prepare('SELECT meta_value FROM '.$wpdb->postmeta.' WHERE meta_key="_sku" AND post_id=%d', $id)
        if(!empty($sku)) $obj->resume = '<b>SKU: '.$sku.'</b><br />'.$obj->resume;
        return $obj;
    }, 10, 2);

    Best regards.

    Thread Starter ottjobs


    Both worked PERFECTLY! Oh my goodness, thank you!

    Wish I could show you an image of it.

    Is there a way to not show the SKU for some search in place sections? The reason is I will also have clients performing searches and I would prefer they not see the SKU.

    How I’m doing it: for the employees, I’ve put a search in place inside their login, but limited their searches to post_types=products. For clients, I am putting search in place on the home page, but limiting their searches to post_types=pages, and pages will only have the services listed.

    For the clients, I’d like their box to avoid showing SKU

    (It’s ok to end this here if it’s too much to figure out)

    Plugin Author codepeople


    Hello @ottjobs

    The code I sent you includes the condition:

    if(!empty($sku)) $obj->resume = '<b>SKU: '.$sku.'</b><br />'.$obj->resume;

    For pages, the condition will fail, and the search result will not include the SKU information.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing font size’ is closed to new replies.