• 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 to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Fred,

    The second link (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

    (@fred2nice)

    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/

    If I follow a FAQ link I have
    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/
    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/
    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, 6 months ago by fred2nice.

    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

    (@fred2nice)

    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.

    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.