Adding text to the "add listing page"

This topic contains 5 replies, has 3 voices, and was last updated by  Simone 9 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #38352

    zblewett
    Free User
    Post count: 37

    Hello,

    I would like to add a message to the page where users create their listing.
    I need to add/change text in a number of places:

    – Right below Add Listing and * indicates required field. I would like to add a message about the listing type with some instructions.

    – The text in the Listing Description field. I would like to put default text into the field as well as change the text below the field.

    – The text on the Image Uploader says “ADD IMAGES : (YOU CAN UPLOAD MORE THAN ONE IMAGES TO CREATE IMAGE GALLERY ON DETAIL PAGE) ” I believe it should read: “ADD IMAGES : (YOU CAN UPLOAD MORE THAN ONE IMAGE TO CREATE AN IMAGE GALLERY ON YOUR DETAIL PAGE)

    I need to make these changes across several custom types.

    Thanks

    #38363

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    this will require to modify a php template and write several conditional tags.

    If you want we can move this post into the jobs section of the forum where developers can provide you their quotes for this.

    Let us know,

    Thanks

    #38364

    Simone
    Expired Member
    Post count: 3515

    Hello,
    you can use the following code inside your functions.php

    
    
    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;
      }

    note the

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

    after the echo you can insert your own text, e.g.

    echo "This is my custom text";

    If you want to use the name of the current post type you can use

    $post_type_info->labels->name

    About your other questions, you can translate/rephrase the strings, using the .po file inside the language folder, more info here
    http://docs.wpgeodirectory.com/translate-core/

    #38377

    zblewett
    Free User
    Post count: 37

    Simone.
    Thank you for the translate information. I was able to do most of what I wanted with that.
    Adding the code to the function.php would allow me to change the title of the add listing page? I’m not looking to change the title. I wanted to add something under the * indicates mandatory fields. I was able to do this by changing the .po file.

    I was not able to change the text under the listing description field. There is no translation in the .po file for this. It there another way to change this?

    #38378

    zblewett
    Free User
    Post count: 37

    If I need to change the text from something that is in a plugin outside of the core geodirectory plugin do I just edit the .po file for that plugin and upload that as well?
    Also when translating how can you tell where occurrences of that word or phrase are? For instance if I wanted to change “Events” in the menu to “Find Events” how can I know that changing “events” in the .po file will only change “Events” in the top menu and not also change it in the bottom bar of the map or somewhere else in the site?

    #38445

    Simone
    Expired Member
    Post count: 3515

    I was not able to change the text under the listing description field. There is no translation in the .po file for this. It there another way to change this?

    What strings are you referring to in the specific?

    You can change the .po for each gd plugin but you must upload the files in a different folder, in /languages as well but each plugin as its own folder, see here for the documentation
    http://docs.wpgeodirectory.com/translating-addons/

    if I wanted to change “Events” in the menu to “Find Events” how can I know that changing “events” in the .po file will only change “Events” in the top menu and not also change it in the bottom bar of the map or somewhere else in the site?

    normally each string/word as its own variable, there is no way to know in advance what other words it will affect.

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

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

Open Support Ticket