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

    In this thread, Elliott mentioned the possibility to add blog meta elements “manually by using a codeblock element or a textblock element”.

    Could someone tell me what to insert in these blocks exactly in order to show blog meta elements in blog posts using Avia Builder Layout?

    Many thanks :)

    #468169

    Hi iclo!

    Well, it’s just dragging a codeblock element to your post content and adding in text / html like so.

    <span class="post-meta-infos">
    <time class="date-container minor-meta updated" itemprop="datePublished" datetime="2014-04-28T19:39:19+00:00">April 28, 2014</time>
    <span class="text-sep text-sep-date">/</span>
    <span class="comment-container minor-meta"><a href="http://kriesi.at/themes/enfold/2014/04/28/new-electric-cars-are-getting-really-fast/#respond" class="comments-link">0 Comments</a></span>
    <span class="text-sep text-sep-comment">/</span><span class="blog-categories minor-meta">in <a href="http://kriesi.at/themes/enfold/category/science/" rel="tag">Science</a> </span>
    <span class="text-sep text-sep-cat">/</span><span class="blog-author minor-meta">by <span class="entry-author-link" itemprop="name"><span class="vcard author"><span class="fn"><a href="http://kriesi.at/themes/enfold/author/kriesi/" title="Posts by Kriesi" rel="author">Kriesi</a></span>
    </span>
    </span>
    </span>
    </span>
    

    It would be best to use the default editor though as this stuff will be added automatically and it makes it a lot easier.

    Best regards,
    Elliott

    #468185

    Thanks Elliott.

    Obviously it would be better to use the default editor but I can’t manage to have the layout I want to have without using the advanced layout builder.

    I inserted a link in private content so you have an idea of what I’m talking about ;)

    #468537

    Hey!

    Yes, you can use the advance layout builder for posts to create full width elements but take note that all default elements such as the post meta info, featured image etc will be removed so you have to start from scratch. You can add the code suggested above to duplicate the default post meta info.

    Regards,
    Ismael

    #468551

    Understood. Having the possibility to use the advanced layout builder for posts is great but post meta elements are important for a blog. I submitted a feature request.

    One question remains. If I add the code suggested as it is, this is published on the post “April 28, 2014 / 0 Comments /in Science /by Kriesi”.
    What should I do in order to have proper info? Do I have to change manually what’s written in the code for every single post? If it’s the case what’s the purpose to add code instead of writing plain text with links?

    Thanks :)

    #468901

    Hey!

    yes, when using ALB for posts you have all the freedom to layout the way you want, but you need to use this freedom as well, so you need to change it for every post you create. You could try to use plain text instead, but I hink the html code Elliott provided to you is just a little bit more precise.

    Cheers!
    Andy

    #489041

    I had the same question and used this workaround:

    1. installed PHP Code for posts plugin
    2. added the following code snippet to the plugin

    <?php
    //your code here!
    echo "geschrieben am "; 
    the_time('j'); 
    echo ". "; 
    the_time('F Y'); 
    echo " in der Kategorie "; 
    the_category(', '); 
    echo ", "; 
    //comments_number( $zero, $one, $more );
    comments_number( 'bislang keine Kommentare', '1 Kommentar', '% Kommentare' );
    ?>

    3. Inserted an avia text element with the corresponding shortcode and span tag
    <span class="post-meta-infos">[php snippet=1]</span>

    For me that worked. Maybe one of you guys at Kriesi can correct my php code to display the proper international date version.

    Regards
    Richard

    #489108

    Hey!

    See here, https://codex.wordpress.org/Function_Reference/the_time. You can change the format options in the function to display a different time format.

    If you leave the options blank, i.e. the_time() then it should use the format you specify in Dashboard > Settings > General.

    Regards,
    Elliott

    #709387

    @ RSchieferdecker

    Thanks for your effort to get a nice solution to display post meta data with Avia Layout builder

    Here is the updated snippet that you can use instead of the snippet written by RSchieferdecker

    By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?>  in <?php the_category(', '); ?> <?php edit_post_link(__('{Edit}'), ''); ?>
    

    This works for and hope will work for everyone

    Source: http://www.wpbeginner.com/wp-themes/how-to-display-post-meta-data-in-wordpress-themes/

    Best Regards,
    Ahmed

    #709401

    Hey!

    Thanks a lot for all the solutions shared.
    Let us know if we can do anything else for anyone of u.

    Best regards,
    Basilis

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Code To Insert In Order To Show Blog Meta Elements In Blog Posts Using Avia’ is closed to new replies.