[Support request] Desciption now shown on archive

Home Forums Support [Support request] Desciption now shown on archive

Home Forums Support Desciption now shown on archive

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1870621
    Jarko

    Please see ticket on Ticket on restaurant menu

    “archive page layout that is defined by your theme does not show the description of the tag.”

    Is it a bug that archive page layout doesn’t show description? As using a plug-in called restaurant that seems to use the archive pages.

    #1870808
    Elvin
    Staff
    Customer Support

    Hi Jarko,

    By default, GP has this element – https://share.getcloudapp.com/nOuPGb5e – that contains the description of the taxonomy. (tag or category).

    But the link you’ve sent is a static page that is set as the front page of the site.

    It’s not a taxonomy archive page so it doesn’t follow the template of archive pages that have the description element.

    #1870885
    Jarko

    How Can I test that description is working on the taxonomy in the theme? The slug is the link provided for that taxonomy?

    Is this a WordPress issue or the plug-in it self if not the theme ?

    Thank you

    #1870964
    Elvin
    Staff
    Customer Support

    How Can I test that description is working on the taxonomy in the theme? The slug is the link provided for that taxonomy?

    Visit an actual archive page of any tags or category (not the static pages you’ve created). Assuming you’ve added a description to the visited taxonomy archive page, its description should display.

    Is this a WordPress issue or the plug-in it self if not the theme ?

    There’s no bug here. It’s not really an issue w/ WordPress or the theme as taxonomy descriptions are not supposed to show on static pages as they are not real archive pages. It’s a matter of setting up a custom archive page from static pages.

    You’re trying to make archive pages from static pages by adding a post list plugin in it expecting the taxonomy details to come it with it but I’m afraid that’s not the case. You’ll have to manually add the tag description if you’re using a static page as an archive page.

    #1871010
    Jarko

    This is a bit confusing and to be honest I am bit lost. I haven’t created a page. (Nothing under pages – all pages in WP) Its the restaurant menu plugin it self that shows the dishes that Also are taxonomy with the tag vegan option that are also a taxonomy. How do I found the url for the taxonomy vegan option if it’s not the slug as you say it’s a static page?

    Thanks

    #1871868
    David
    Staff
    Customer Support

    Hi there,

    sorry my colleague was mistaken. It is an archive page but it looks like a custom archive page, which is doing its own thing. For example it has its won mprm-header element for outputting the title within the content. I am not sure what method they are using but the GP Entry Header exists on that template but its empty – by default this would get the archive title and description if it existed.

    Can you check with developer as to how their description should be output ?

    #1873625
    Jarko

    No worries, on https://wordpress.org/support/topic/description-not-showing-for-tags/ you can follow my discussion with the plug-in maker.

    Latest is:
    “ If you enable the default twenty twenty theme you should be able to see description of the tag on the archive page since there is added get_the_archive_description() in the archive file of the theme. Please try to add get_the_archive_description() to the archive file of your theme.”

    #1873675
    David
    Staff
    Customer Support

    If you want – you can create a new Hook Element:

    Add this to the Hook text area:

    <?php get_the_archive_description(); ?>

    Select the Hook: generate_after_archive_title
    Check Execute PHP
    And then in the Display rules location – select the relevant 'post-type' archive

    #1874994
    Jarko

    I tried to make the hook as you described but it didn’t show the description ;(

    Also waiting answer from the plugin maker..

    #1875089
    Jarko

    It didn’t work with WP 2021 theme, for fun I tried with the WP 2020 Theme and the description worked there?
    Adding a temp URL where its working with the Twenty Twenty theme if that gives you anything?

    #1875110
    David
    Staff
    Customer Support

    If the GP hook didn’t work then i can only assume the plugin is generating its own archive template with its own hooks. If the plugin author can confirm there are hooks available then we can help add that in.

    #1875112
    Jarko

    What confuse me is Why is working in the twenty twenty theme, the description is working there And when looking in: edit theme and in Main index temple the get_the_archive_description is used with other code that I don’t what it’s doing 🙂

    #1875505
    Jarko

    Made progress if I add Echo to the code it Will show the description

    <?php echo get_the_archive_description(); ?>

    But I need to use generate_before_content as generate_after_archive_title not working ?

    #1876987
    David
    Staff
    Customer Support

    Sorry for the delay, i though i had replied to your topic but it seems it didn’t go through.
    So thats the generate_archive_title function not being called.

    Try adding this PHP Snippet:

    add_action('mprm_category_header', function() {
        echo get_the_archive_description();
    },15);
    #1878051
    Jarko

    Thanks but the snippet didn’t work? ;( How can I check that mprm_category_header is correct?

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.