Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #699994

    Hi all.

    I’ve created a new page and with layout advanced editor, I’ve inserted the #avia_sc_blog to show the paginated list of posts of a certain category.

    Til this point all done, but my answer is: if I would to insert this piece of code

                    //tags on single post
                    if(has_tag()) {
                      echo '<span class="blog-tags minor-meta">';
                      the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> ');
                      echo '</span></span>';
                    }
    

    to show also the tags of the post where I have to include it?

    Thanks,
    Alex.

    #700149

    Hi all.

    I solved the problem by myself.

    For other that find a similar solution these are the steps.

    1. create a new element for Avia Layout Builder following these steps: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/ (in my case I’ve duplicated the blog.php);
    2. modify the new source element code with all informations I need (name, order, shortcode, tooltip) and the name of PHP class;
    3. included a new field into the element for user to choose if show tags of a post or not (in my case show_post_tags);
    4. modified the function shortcode_handler into source element code to handle the new user field;
    5. created the $avia_config variable to save the choose of user for new field;
    6. duplicated ‘loop-index.php’ file to handle the new field of new element;

    and that’s all.

    I hope this can help anyone are finding a solution to a similar problem.

    Alex.

    • This reply was modified 7 years, 5 months ago by IOL2014.
    #700752

    Hi Alex,

    Great, glad you solved it and thanks for sharing your solution!

    Cheers!
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.