How/Where to change the H1 tags

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

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

Open Support Ticket
  • Author
    Posts
  • #379977

    Christopher Schroeder
    Free User
    Post count: 13

    Hi,

    I’ve searched everywhere and have tried just about everything to change the content within the H1 tag for the search pages with no luck.

    I started out trying to update the text on the ‘Titles & Metas’ admin section of GeoDirectory but no luck. I tried checking and unchecking the box to override Yoast.

    I always used child themes and followed the instructions here: https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    I searched the entire geodirectory-en_US.po file and was unsuccessful.

    I found the geodir_action_search_page_title function on the geodirectory_template_actions.php page around line 3002. However, I was unable to figure out what exactly needed to be done and was hoping there was a simpler and smarter way to go about updating the text so that it’s not hardcoded and programmatically shows the category/search option the user selected from the dropdown and NOT the ‘Search Programs’ text. The word ‘Programs’ was edited via the custom posts add-on.

    Any help would be greatly appreciated

    #380091

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    I asked to our developers to have a look at your question and let us know if they have a quick solution.

    Thanks

    #380161

    Giri
    Expired Member
    Post count: 3155

    Hi Christopher,

    You need to remove the old action and then creation new function and hook it to the action.

    Something like this

    
    
    remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
    add_action('geodir_search_page_title', 'customized_geodir_action_search_page_title', 10);
    function customized_geodir_action_search_page_title() {
    
    }

    Here customized_geodir_action_search_page_title function is an modified copy of geodir_action_search_page_title function. Just copy paste that function contents and then modify it as per your needs.

Viewing 3 posts - 1 through 3 (of 3 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