
-
AuthorPosts
-
January 10, 2023 at 12:31 pm #1378110January 11, 2023 at 7:14 am #1378203
Hey hhlee98815,
Thank you for the inquiry.
Are you using the Blog Posts element? If yes, then you can try this filter in the functions.php file.
function avf_post_slider_entry_excerpt_mod($excerpt, $prepare_excerpt, $permalink, $entry ) { $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" style="display:block"><p class="post-tags-inner">'; 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 .= '<span class="text-sep"> | </span>' ; } } $tags_output .= '</div>'; $excerpt = $tags_output . $excerpt; }; return $excerpt; } add_filter('avf_post_slider_entry_excerpt', 'avf_post_slider_entry_excerpt_mod', 10, 4);
Best regards,
IsmaelJanuary 11, 2023 at 8:05 am #1378214Hi Ismael,
Thanks for your answer.Yes,I am using the Blog Posts element.
*Blog Style:
Single Author, big preview Pic and Grid LayoutIt would appear to be working on this page, but can I change his location? I hope it is above the title of the post.
But on this one page still can’t show the tag.
How should I do ?Thank you !
January 14, 2023 at 8:17 pm #1378696January 16, 2023 at 8:52 am #1378822Hi,
I have the same problem, that the content displays below the title, but I would like to have it on top of it.
I am using the Blog Posts Slider.
Thank you!Alex
January 16, 2023 at 1:23 pm #1378858Hi,
@alex.ndu, this thread is about the placement of the “tags”, we would like to keep each thread on a single topic as it helps future users when searching for answers.
On your page you seem to have two Blog Posts Sliders, one for posts and one for products so I don’t know if you want to move the title below the excerpt for both of them, assuming that you do try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function move_title_below_excerpt() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ $('.slide-entry').each(function() { $(this).find('.slide-entry-title.entry-title').css({'margin-top':'15px'}).insertAfter($(this).find('.slide-entry-excerpt.entry-content')); }); })(jQuery); }); </script> <?php } add_action('wp_footer', 'move_title_below_excerpt');
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
You also have some custom css that you should remove to make this look nicer:.avia-content-slider .slide-entry-title { margin-bottom: 15px!important; }
If this doesn’t help please open a new thread with the url to the page in question and further details on what you are trying to achieve so we can be of more assistance. Thanks for understanding.
Best regards,
MikeJanuary 16, 2023 at 4:38 pm #1378896Hi Mike,
thank you for the quick answer.
I am sorry for the misunderstanding, I should have been more clear. With “content” I meant the content of the tag container, after using the code provided for hhlee98815.
The tags are now added to the container with the class “slide-entry-excerpt”, but I would like them to display above the title.
Thank you!January 16, 2023 at 9:13 pm #1378960Hi,
Thanks for the feedback, try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function move_post_tags_above_title() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ $('.slide-entry').each(function() { $(this).find('.post-tags').insertBefore($(this).find('.slide-entry-title.entry-title')); }); })(jQuery); }); </script> <?php } add_action('wp_footer', 'move_post_tags_above_title');
Best regards,
MikeJanuary 17, 2023 at 9:19 am #1388019Hi Mike, it works wonderfully.
Thank you very much!January 17, 2023 at 12:55 pm #1388036Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘How can I display the tag above the title on post blog?’ is closed to new replies.