Title: Category slug from shortcode
Last modified: November 29, 2017

---

# Category slug from shortcode

 *  [fred2nice](https://wordpress.org/support/users/fred2nice/)
 * (@fred2nice)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/)
 * I used the shortcode :
    [ultimate-faqs include_category=’ophtalmologie’ post_count
   =’5′] The link for categories is /vos-questions-aux-docteurs/faq-category/ophtalmologie/
   but the “normal link” to category should be : /ufaq-category/ophtalmologie/
 * Did I make a mistake?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcategory-slug-from-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9734345)
 * Hi Fred,
 * The second link ([https://www.ophtalmologues-abel-cagnes.com/ufaq-category/ophtalmologie/](https://www.ophtalmologues-abel-cagnes.com/ufaq-category/ophtalmologie/))
   will link to the permalink page WordPress generates for that category, without
   the formatting our plugin applies. If that’s what you want, then you can use 
   that link.
 *  Thread Starter [fred2nice](https://wordpress.org/support/users/fred2nice/)
 * (@fred2nice)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9734435)
 * Thank you for your fast the answer !
 * In fact I put “questions-ophtalmologues” as slug for ufaq plugin
    [https://www.ophtalmologues-abel-cagnes.com/questions-ophtalmologues/](https://www.ophtalmologues-abel-cagnes.com/questions-ophtalmologues/)
 * If I follow a FAQ link I have
    [https://www.ophtalmologues-abel-cagnes.com/questions-ophtalmologues/traitement-botox-acide-hyaluronique/](https://www.ophtalmologues-abel-cagnes.com/questions-ophtalmologues/traitement-botox-acide-hyaluronique/)**
   Slugs are good**.
 * If I click on category “Esthétique” from the Breadcrumb :
    _Ophtalmologues Abel
   Cagnes > FAQs > **Esthétique** > Traitement Botox ou acide hyaluronique_ I have:
   [https://www.ophtalmologues-abel-cagnes.com/ufaq-category/esthetique/](https://www.ophtalmologues-abel-cagnes.com/ufaq-category/esthetique/)
   Here I expected to have something with my custom slug, but never mind I can keep“
   ufaq-category”
 * Inside a page where I used the shortcodes :
    [https://www.ophtalmologues-abel-cagnes.com/vos-questions-aux-docteurs/](https://www.ophtalmologues-abel-cagnes.com/vos-questions-aux-docteurs/)
   If you click on “Traitement Botox ou acide hyaluronique” the category url is **/
   vos-questions-aux-docteurs/**ufaq-category/esthetique/ The permalink for the 
   FAQ itself is good, so my trouble is on the permalink on categories expanded 
   from the shortcode.
 * Easy to show, hard to explain ,-)
 * I use a shortcode because I would like to customize the FAQ home page, but maybe
   there is an another way to modify the FAQ page itself ?
    -  This reply was modified 8 years, 9 months ago by [fred2nice](https://wordpress.org/support/users/fred2nice/).
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9738345)
 * Hi Fred,
 * Everything looks to be functioning correctly. That’s the way breadcrumbs work
   in WordPress for custom post types. They’ll show the post type permalink page.
   On top of that, it’s your theme that decides how to implement the breadcrumbs
   and how permalink pages look and function. We can only control what is created
   by our shortcodes.
 *  Thread Starter [fred2nice](https://wordpress.org/support/users/fred2nice/)
 * (@fred2nice)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9739004)
 * So if it’s the normal way sorry to bother you ,-)
 * Shortcodes/DisplayFAQs.php
    if ($Pretty_Permalinks == “Yes”) {$Category_URL =
   $current_url . “faq-category/” . $Category_Term->slug . “/”;} to if ($Pretty_Permalinks
   == “Yes”) {$Category_URL = “/ufaq-category/” . $Category_Term->slug . “/”;}
 * Because I would like to have only one FAQ :
    /FAQ-custom-slug/category/slug-cat/
   FAQ-custom-slug/FAQ-slug or even better /FAQ-custom-slug/category-custom/slug-
   cat /FAQ-custom-slug/category-custom/slug-cat/FAQ-slug
 * But may be it’s not the right way.
 * Again thank you for your replies, I appreciate.
 *  [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * (@etoilewebdesign)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9749399)
 * Hi Fred,
 * That is the correct line of code to change the category bases generated in our
   shortcode, just remember to take a copy of the file beforehand (so you can revert
   if something goes wrong).
    Also, if you update the plugin in the future, you 
   may need to reapply these custom changes as updates can sometimes override custom
   code.

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘Category slug from shortcode’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-faqs/assets/icon-128x128.png?rev=1803957)
 * [Ultimate FAQ Accordion Plugin](https://wordpress.org/plugins/ultimate-faqs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-faqs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-faqs/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-faqs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-faqs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-faqs/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/category-slug-from-shortcode/#post-9749399)
 * Status: not resolved