Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1378110

    In the red box
    2023-01-10_17-07-19
    2023-01-10_17-02-45

    #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,
    Ismael

    #1378214

    Hi Ismael,
    Thanks for your answer.

    Yes,I am using the Blog Posts element.
    *Blog Style:
    Single Author, big preview Pic and Grid Layout

    It 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 !

    #1378696

    Hi,
    Thank you for your patience, when I check the tags seem to be showing, this one is above the title:
    Enfold_Support_0067.jpeg
    and these are also above the title:
    Enfold_Support_0068.jpeg
    is this correct?

    Best regards,
    Mike

    #1378822

    Hi,

    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

    #1378858

    Hi,
    @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,
    Mike

    #1378896

    Hi 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!

    #1378960

    Hi,
    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,
    Mike

    #1388019

    Hi Mike, it works wonderfully.
    Thank you very much!

    #1388036

    Hi,
    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

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How can I display the tag above the title on post blog?’ is closed to new replies.