One of the top question to FlyCoffee Offers is: “How to change the link to offers custom post FlyCoffee”.
– First of all why we add the slug to offers: “fly-offer”?
– We add this slug for security reason to no conflict with another plugins or resources used in WordPress.
Now I give you some code that you can add in your “flycoffee-child/functions.php” file, and change this slug for example with “events”.
Note: “If you didn’t have the functions.php file in your child theme please create a blank PHP file with this name – functions.php”, if this file exists you need to add at the end of the file this code:
// categories function custom_fly_offers_rewrite(){ return 'events'; } add_filter('fly_offers_rewrite', 'custom_fly_offers_rewrite'); // single post function custom_fly_offer_rewrite(){ return 'event'; } add_filter('fly_offer_rewrite', 'custom_fly_offer_rewrite');
After you add this code to functions.php, you need to go to Settings->Permalinks and save permalinks.
Attention if you have a plugin that uses this slug “events” will be a conflict.
Hope this help you to change the slug of the offer like you want and make this links more user-friendly.
Follow our news and updates!
Join our mailing list to receive the latest news, updates & secrets from our team. "We help you to create a website faster" - FlyTemplates.
Comments