Change the text that displays on Custom Post Type Selector in Search Bar

This topic contains 6 replies, has 3 voices, and was last updated by  Ian Mullen 6 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #417934

    Ian Mullen
    Expired Member
    Post count: 31

    Hello,

    How can I change the text that displays on the Custom Post Type Selector in the search bar?

    I would like to add “Search by ” before the name of the CPT.

    Thanks

    #417947

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    do you mean, if you had events and places for example, that is would say “Search Events” and “Search Places” ?

    #417957

    Ian Mullen
    Expired Member
    Post count: 31

    Hello, Yes, but that it would say “Search by Events” or “Search by Places”

    Thank you

    #417959

    Alex Rollin
    Moderator
    Post count: 27815

    You could try it with custom CSS, using the before selector

    https://www.w3schools.com/cssref/sel_before.asp“Hello Michael,

    For more information about customizing your style as well as how to add custom CSS to your site, please see the related links below.

    Links
    https://wpgeodirectory.com/docs/customizing-your-style/
    https://wpgeodirectory.com/docs/common-styling-examples/

    Hope that helps 🙂

    Alex

    #417966

    Ian Mullen
    Expired Member
    Post count: 31

    Thanks for your response, but I’m still stuck!

    I have spent the evening trying to figure this out, but with not much success.

    I’ve tried various forms of this but no success yet:

    .gd-search-field-cpt.select::before {
    content: “Search by”; !important;
    }

    what might i be doing wrong?

    thanks

    #418028

    Kor
    Moderator
    Post count: 16516

    Hi Ian,

    Thanks for your reply. Just played around with it on my end and it looks like achieving what you needed there isn’t possible. But you can try this and see if it’s what you’re looking for.

    
    
    .gd-search-input-wrapper.gd-search-field-cpt:before {
    content: "Hello"!important;
    }
    #418305

    Ian Mullen
    Expired Member
    Post count: 31

    thanks – i’ll have to leave it, and i’ll find another way around it! thanks for your help anyway!

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket