Adding text to the "add listing page"
This topic contains 5 replies, has 3 voices, and was last updated by Simone 10 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
April 30, 2015 at 4:38 pm #38352
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
April 30, 2015 at 5:25 pm #38363Hi,
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
April 30, 2015 at 5:29 pm #38364Hello,
you can use the following code inside your functions.phpadd_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/April 30, 2015 at 8:16 pm #38377Simone.
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?
April 30, 2015 at 8:31 pm #38378If 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?May 1, 2015 at 3:02 pm #38445I 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.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket