- This topic has 9 replies, 2 voices, and was last updated 3 years, 7 months ago by
wensolutions.
-
AuthorPosts
-
January 29, 2020 at 10:40 pm #23376
oligo11
ParticipantHi there,
after a search in the forum, I found the following code I copied/pasted in my child theme function.php :
function travel_log_child_remove_cat_titles($title) { if ( is_archive() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_author() ) { $title = '<span class="vcard">' . get_the_author() . '</span>' ; } return $title; } add_filter( 'get_the_archive_title', 'travel_log_child_remove_cat_titles' );
The problem to me is that it suppresses the whole category title, leaving a page without title.
So, instead of removing: “archives: itinerary” I would like it to display only “itinerary” and remove only the word “archives:”Is that possible?
Thank you
OlivierJanuary 30, 2020 at 11:34 am #23399wensolutions
KeymasterHello,
Can you please provide us with site URL so that we can help you?
Regards.
January 30, 2020 at 5:03 pm #23409oligo11
ParticipantHi,
thanks for your reply.
Here is the page: http://roadzine.idealand.fr/sejours/
In the permalinks settings, I replaced “itinerary” by “sejours” so on the front end, the page displays: “archives: sejours”, which is normal.I would like to know if it is possible to suppress only the word “archives: ” and display only the slug “sejour”.
If not, is there a way to create a page where I would display all my itineraries classified by date?
Thank you and regards
Olivierps: I’m on WP Travel Pro
January 31, 2020 at 6:27 am #23424wensolutions
KeymasterHello,
Please add following given code in functions.php file of your child theme to remove the word ‘Archives:’.
add_filter('get_the_archive_title', function ($title) { return preg_replace('/^\w+: /', '', $title); });
Hope this helps.
If you have any queries further, let us know.
Thank you.
January 31, 2020 at 6:45 am #23425oligo11
ParticipantHi, thank you but it’s not working.
If it’s not possible, is there a way to create a page where I would display all my itineraries classified by date? Like an archive page?
ThanksJanuary 31, 2020 at 7:35 am #23426wensolutions
KeymasterHello,
Actually, the code we have provided is working fine in our side as you can see in screen record below:
https://www.loom.com/share/fac9f1ef8530470992ff425aadac1e0f
So, can you please make sure that you have added the code in functions.php file of your child theme properly?
Also, make sure that the child theme has been activated.
Further, if it doesn’t work then please provide us with admin login detail in below given email so that we can help you.
email: support@wptravel.io
Thank you.
February 1, 2020 at 2:01 pm #23464oligo11
ParticipantThanks for your reply.
Ok, I’ll check this out (I’m off for a week). It should work and I’ll let you know.
Thanks for your help
RegardsFebruary 3, 2020 at 3:50 am #23493wensolutions
KeymasterHello,
Of course, during verification of issue please let us know if issue will be resolved or not.
Thank you.
February 12, 2020 at 11:11 am #23843oligo11
ParticipantHi,
I am back as the site is now ok again.Sorry but it’s still not working and I followed your instructions.
Can you please check this for me? I sent my credentials earlier today…Also, can you tell me which shortcode to use if instead of making an archive page, I want to list only a specific category of tours on a dedicated page (like Group’s Tour or Individual Tours).
Thank you
OliFebruary 12, 2020 at 12:13 pm #23850wensolutions
KeymasterHello,
Actually, we are unable to edit the file in backend section as you can see in screenrecord below:
https://www.loom.com/share/85fe70a028ca4c7cb234ee5ad9b0c031
Regarding using shortcode, you can use shortcode to display the trips according to trips_types, trips_by_location, featured_trips etc.
For detail assistance regarding shortcode available for trips, please refer link of our official documentation which is given below:
https://wptravel.io/documentations/user-documentation/#doc-shortcode-50
Regards.
-
AuthorPosts
- The forum ‘WP Travel Pro’ is closed to new topics and replies.