- This topic has 17 replies, 3 voices, and was last updated 2 years, 8 months ago by David.
-
AuthorPosts
-
July 25, 2021 at 3:08 pm #1870621Jarko
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.
July 25, 2021 at 10:48 pm #1870808ElvinStaffCustomer SupportHi 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.
July 26, 2021 at 12:33 am #1870885JarkoHow 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
July 26, 2021 at 1:31 am #1870964ElvinStaffCustomer SupportHow 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.
July 26, 2021 at 2:00 am #1871010JarkoThis 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
July 26, 2021 at 11:06 am #1871868DavidStaffCustomer SupportHi 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 ?
July 27, 2021 at 5:01 pm #1873625JarkoNo 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.”July 27, 2021 at 6:46 pm #1873675DavidStaffCustomer SupportIf 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
July 28, 2021 at 12:39 pm #1874994JarkoI tried to make the hook as you described but it didn’t show the description ;(
Also waiting answer from the plugin maker..
July 28, 2021 at 2:52 pm #1875089JarkoIt 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?July 28, 2021 at 3:54 pm #1875110DavidStaffCustomer SupportIf 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.
July 28, 2021 at 4:21 pm #1875112JarkoWhat 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 🙂
July 29, 2021 at 3:20 am #1875505JarkoMade 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 ?
July 30, 2021 at 5:33 am #1876987DavidStaffCustomer SupportSorry for the delay, i though i had replied to your topic but it seems it didn’t go through.
So thats thegenerate_archive_title
function not being called.Try adding this PHP Snippet:
add_action('mprm_category_header', function() { echo get_the_archive_description(); },15);
July 31, 2021 at 12:58 am #1878051JarkoThanks but the snippet didn’t work? ;( How can I check that mprm_category_header is correct?
-
AuthorPosts
- You must be logged in to reply to this topic.