-
AuthorPosts
-
December 21, 2022 at 3:52 am #1376953
Hi,
In the Blog Layout (in Theme Options), I have set the Blog Post Tags to display.
I am using the Blog Post element from the Advanced Layout Editor to display my posts in a list format.
The problem is that the tag is actually not displaying for each post. Is there a bug with this tag setting?
Many thanks,
AngelaDecember 21, 2022 at 10:27 am #1376974but are you posts edited with advanced layout builder or with default wordpress editor ( or with block editor ) ?
December 22, 2022 at 1:11 am #1377064Just to clarify, the tag field actually does appear when you look at an individual post.
However, tags are not displayed for a list of posts displayed using the Blog Post element.
Thanks,
AngelaDecember 30, 2022 at 2:37 pm #1377340January 3, 2023 at 1:43 pm #1377457hi mike – happy new year to you !
But this is not the list view. I think on list view there are no meta tags on default ( your screenshot looks like single author, small preview … )
January 3, 2023 at 2:05 pm #1377463Hi,
Guenni007, happy new year to you too, I matched the layout to what Angeladlh linked to in the Private Content area, I know he wrote list format but his page is actually single author, small preview as you point out.Best regards,
MikeJanuary 3, 2023 at 4:20 pm #1377476ok – but maybe it is better to only insert those tags – if on options it is marked – like it is done on single posts
January 3, 2023 at 5:16 pm #1377481maybe this child-theme functions.php snippet is a nice alternative to insert tags to blog:
it will show the tags in the meta info area:function new_avf_post_slider_meta_content($meta_content, $entry, $index, ) { $tags = get_the_tags($entry->ID); $tags_output = ""; if('blog-meta-tag' == avia_get_option('blog-meta-tag') && $tags ){ $tags_output .= '<div class="post_tags">'; // $tags_output .= '<div class="post_tags"><strong>' . __( 'Tags:', 'avia_framework' ) . ' </strong>'; foreach ( $tags as $tag ) { $tags_output .= '<a href=" '. get_tag_link( $tag->term_id ) .' ">'; $tags_output .= '<strong>'. $tag->name .'</strong>'; $tags_output .= '</a>' ; if(next($tags)){ $tags_output .= ' | ' ; } } $tags_output .= '</div>'; $meta_content = $tags_output . "<br>" . $meta_content; }; return $meta_content; } add_filter('avf_post_slider_meta_content', 'new_avf_post_slider_meta_content', 10, 3);
January 5, 2023 at 10:34 pm #1377770Hi,
Thank you for your responses but I do not know how to update the php file. I am worried to do so in case I break my site.
Is there a css alternative, please?
Thanks,
AngelaJanuary 6, 2023 at 1:16 pm #1377851Hey Angela,
You are already using a child theme so you can simply copy and paste the code @guenni007 posted into functions.php file of your child theme in Appearance > Editor.
If you would like us to do it for you, please create temporary WP admin logins and FTP logins and post them here privately :)
Best regards,
YigitJanuary 6, 2023 at 1:21 pm #1377853But – layout will be a bit different to Mikes – this will add the tags to the meta info area. On some blog styles these will be under cat on others it will be on the bottom:
see here a testpage: https://webers-testseite.de/blog/January 6, 2023 at 1:22 pm #1377854Hi,
Guenni007, I tested your function above but it didn’t seem to work with the blog post element using single author, small preview, is this element that you tested it with?Best regards,
MikeJanuary 13, 2023 at 7:50 pm #1378640Hi,
@Angeladlh Thank you for your patience, right now the only way to add the tags in the blog element when using the single author,small preview like you are is with the modified /enfold/includes/loop-index.php file that I linked to above.
The Dev Team will make this feature available in the v5.4 update, so if you want to wait until then you won’t need to modify the file.
Please let us know if you need further assistance or if we shall we close this thread.Best regards,
MikeJanuary 18, 2023 at 6:14 am #1393853Hi Mike,
Could you please tell me when the V5.4 update will be available?
Thanks,
AngelaJanuary 18, 2023 at 8:53 pm #1393996Hi,
The Dev Team says it should be released on Monday, I have checked the blog element and it will show the tags if you add this filter to your child theme functions.php:add_filter('avf_show_tags_meta', 'show_tags_on_blog_posts'); function show_tags_on_blog_posts(){ return true; }
This new feature has been added to our documentation: Display post tags on Blog Posts element
Best regards,
MikeFebruary 1, 2023 at 3:50 am #1396119Hi,
So, is the php coding required as well as having the new version?
My problem is that I have no idea how to update the php file. Is there css code that can be used instead?
Thanks,
AngelaFebruary 1, 2023 at 9:38 am #1396160 -
AuthorPosts
- The topic ‘Tag meta element not working for blog page’ is closed to new replies.