How can we change the Add Details title on the details listing page? I want to change it to Add Listing instead of Add Details. Thank you!
Thomas
How can we change the Add Details title on the details listing page? I want to change it to Add Listing instead of Add Details. Thank you!
Thomas
Hi,
Do you know how to add code snippets? If so, add this code snippet:
add_filter(
'hivepress/v1/routes',
function( $routes ) {
if(isset($routes['listing_submit_details_page'])){
$routes['listing_submit_details_page']['title'] = 'Add listing details';
}
if(isset($routes['request_submit_details_page'])){
$routes['request_submit_details_page']['title'] = 'Add request details';
}
return $routes;
},
1000
);
You can change the text to whatever you want by changing the âadd listingâ part and writing what you want.
Included is a change for the request add details, in case you wanted to change the request also, to just âadd requestâ instead of add details.
Hi @aqmiami7 , this snippet is very useful because in this way you can use different titles to the request and submit listing.
But there is some fatal error, syntax erro on line 5. I just copied your code without changing the text yet, and the result is fatal error with message:
syntax error, unexpected identifier "listingâ"
Can you advise if something is missing on the code? Thanks!
Not sure why you are getting the syntax error. It is working for me. I found and copied this code snippet while reading in the hivepress community, from their support team.
Rudy, try again. ihor fixed the code snippet. I had some formatting issues from copying and pasting it.
The easiest way to change this text is using Loco plugin How to change any static text - HivePress Help Center Please note that if you also use the Requests extension, then this âAdd Detailsâ text will be also changed for requests since thereâs the same text (in this case you can use the snippet suggested above).
Thanks a bunch! I used the code snippet aqmiami7 suggested. It worked like a charm!
I tried using Loco plugin earlier and it was a bit confusing. The code snippet above was much easier to do. Not sure what you mean by Requests extension. Thanks for your help.
Glad it worked. The Request extension is a paid add on extension offered by hivepress. When you go to hivepress.io, you can see a list of the extensions they offer.
What ihor was saying was that if you bought and use the request extension it will also effect and change the text if you use the loco translate plugin.
Loco translate is actually pretty handy to change the name of any text displayed on your website. If you need help with it, I can show you how to use it. But if you only needed that text changed, then yes the code snippet provided works great.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.