add_listing_page_title

This topic contains 8 replies, has 2 voices, and was last updated by  Simone 9 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #34393

    Ian Butler
    Buyer
    Post count: 59

    Hi Guys,

    How can I change what gets pulled through here GEODIRECTORY_TEXTDOMAIN

    echo apply_filters('geodir_add_listing_page_title_text',( ucwords(__('List an',GEODIRECTORY_TEXTDOMAIN)

    I’m sure it’s set in the Dashboard setings but can’t seem to find it anywhere?

    Thanks

    #34408

    Simone
    Expired Member
    Post count: 3515

    Hello Ian, this is telling that the string (in this case the add listing title text) can be translated in the .po file, you can use the .po file to change that following the tutorial here
    http://docs.wpgeodirectory.com/translate-core/

    #34410

    Ian Butler
    Buyer
    Post count: 59

    Hi Simone,

    I’ve done that but it hasn’t worked – I was sure this was controlled in the Dashboard somewhere?

    #34412

    Simone
    Expired Member
    Post count: 3515

    So, you want to change where it says “Add Listing”, correct? I can see the string in the geodirectory-en_US.po file inside /geodirectory/geodirectory-languages.
    Try eventually to erase the browser in your cache

    #34413

    Simone
    Expired Member
    Post count: 3515

    So, you want to change where it says “Add Listing”, correct? I can see the string in the geodirectory-en_US.po file inside /geodirectory/geodirectory-languages.
    Try eventually to erase the browser in your cache

    #34415

    Ian Butler
    Buyer
    Post count: 59

    No I want the page title to read ‘List an Attraction’ rather than ‘List an Place’

    Thanks

    #34418

    Simone
    Expired Member
    Post count: 3515

    You can change the label Place inside the custom post type addon, jut edit the Place post type and find the label.
    The remaining “Place” words are in the language file

    some time ago I’ve created a function to automatically add a heading in that page (below that title):

    
    
      add_action( 'geodir_add_listing_page_title', 'geodir_add_listing_page_title_custom',10 );
      function geodir_add_listing_page_title_custom()
        
      {
    	global $wp, $term, $post, $current_term, $wp_query;  $gd_post_type = geodir_get_current_posttype();
      $post_type_info = get_post_type_object( $gd_post_type );
      
      
      echo "List ".$post_type_info->labels->name;
      }
    

    this will automatically add the post type name after “List” so “List Attractios” in your case, if you’re only using a post type, you can add “an” like this

    
    
      echo "List an ".$post_type_info->labels->name;
    

    Ps- place the code in your functions.php inside your child theme folder.

    #34428

    Ian Butler
    Buyer
    Post count: 59

    Thanks Simone!

    #34432

    Simone
    Expired Member
    Post count: 3515

    you’re welcome

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

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

Open Support Ticket