How do I change the title at search page?

This topic contains 6 replies, has 2 voices, and was last updated by  Guust 7 years, 3 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #410338

    Garrick Soohoo
    Free User
    Post count: 37

    Hi guys,

    I am working on my site and want to know how to customize the title above the search results?
    I try to update the variables at SEARCH PAGE META SETTINGS in Geodirectory/titles&meta. But it doesnt make effects. I dont want the words: “search place …”.
    https://classicalcitizens.com/?geodir_search=1&stype=gd_place&s=+&snear=D&sgeo_lat=37.7093735&sgeo_lon=-89.21992639999996

    same for tags page, it is doesn’t show the %in_location_single% variable.

    last I am wondering how to remove the place post type?

    #410339

    Guust
    Moderator
    Post count: 29970

    “search place …” can be changed with the language file, by changing “Search”.
    “Places” is there because that is the plural name of the custom post type [CPT].

    For example, see https://classicalcitizens.com/?geodir_search=1&stype=gd_string_teacher&s=+&snear=&sgeo_lat=&sgeo_lon= and you will see “Places” is replaced with the plural name of the other CPT.

    You cannot delete the Places default CPT, but you can rename the CPT. Or if you delete all places and place categories, the CPT will disappear from your public website.

    The “titles and meta” is for the meta data only, not for the display on the page. For the search page, you need to use %%search_near%% instead of %in_location_single%

    #411079

    Garrick Soohoo
    Free User
    Post count: 37

    Thanks Guust, it really helps. I also have some questions about event post types.

    1: is that possible to add the GD search widget in the events page: https://classicalcitizens.com/events/
    For now it just shows all the event without any filters

    2: Is there any way I can delete or hide the ‘event’ option in the main page search list. but also I want to create some search options under the events page.

    #411082

    Guust
    Moderator
    Post count: 29970

    1. You can add the GD Search widget anywhere you like, see https://wpgeodirectory.com/docs/layout/#directory
    To add it to the Events page, you would add the GD Search widget to the GD Listings sections at Appearance > Widgets.
    See also https://wpgeodirectory.com/docs/widgets/

    2. Not sure exactly what you mean. DO you want to remove “Events” from the CPT search options?
    https://wpgeodirectory.com/docs/gd-search/#cpt
    That can be done by adding this CSS:

    .search_by_post option[value=gd_event] {display: none;}

    To only hide that on the homepage:

    .home-page .search_by_post option[value=gd_event] {display: none;}

    Let us know if I misunderstood.

    #411088

    Garrick Soohoo
    Free User
    Post count: 37

    Cool. Thanks a lot. That’s exactly what I want.

    I am failed to hide a couple of search options. For example, I try to hide all the options except

    event

    in the list page.

    .site-content .search_by_post option[value!=gd_event] {display: none;}

    Any comments would be helpful

    Thanks!

    #411089

    Guust
    Moderator
    Post count: 29970

    Look at the body classes for the events pages, you’ll see this is added “post-type-archive-gd_event”
    So the CSS would be

    .post-type-archive-gd_event .search_by_post option[value=gd_place] {display: none;}

    etc. Adding “!” does not work there, so you will have to add the code for each CPT.

    #411090

    Guust
    Moderator
    Post count: 29970

    Or you could just hide the selector all together on the Events page:
    https://wpgeodirectory.com/docs/common-styling-examples/#cpt-selector

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
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount