-
AuthorPosts
-
February 21, 2020 at 11:21 am #1186671
Hello,
I have a question:
On a Blog-Detail-Page is it possible to use the Avia Layout Architect and STILL have the Meta Information given above, e.g. Date, Category, Author etc.Thanks,
AlexFebruary 24, 2020 at 12:03 pm #1187270Hey alex,
Unfortunately there’s no way to do that, because if you use Advanced Layout Builder it will be a clean slate so the content area is based on what you add.
The workaround we can suggest for that is to use a Text Block.Best regards,
NikkoFebruary 24, 2020 at 12:09 pm #1187273Thanks for your answer.
By saying “The workaround we can suggest for that is to use a Text Block.” you mean to manually enter the META-Information on top of the content or did I get you wrong?
February 24, 2020 at 12:35 pm #1187282Hi alex,
Yes, you are correct.
Best regards,
NikkoFebruary 24, 2020 at 1:24 pm #1187319Thanks.
Are there shorcodes etc. from which I can generate a “template”, like “”publishing date”, “category” etc.?February 24, 2020 at 4:01 pm #1187379Hi alex,
Please add this code at the bottom of your child theme’s functions.php (or you can copy from here: https://pastebin.com/sAKCw1c3 )
function enfold_post_meta_infos() { $output = "<div class='main_color'>"; $output .= "<span class='post-meta-infos'>"; $output .= "<time class='date-container minor-meta updated' >" . get_the_time( get_option( 'date_format' ), get_the_ID() ) . '</time>'; $output .= "<span class='text-sep text-sep-date'>/</span>"; // if ( get_comments_number( get_the_ID() ) != '0' || comments_open( get_the_ID() ) ) // { $output .= "<span class='comment-container minor-meta'>"; ob_start(); comments_popup_link( '0 ' . __( 'Comments', 'avia_framework' ), '1 ' . __( 'Comment', 'avia_framework' ), '% ' . __( 'Comments', 'avia_framework' ), 'comments-link', '' . __( 'Comments Disabled','avia_framework' ) ); $output .= ob_get_clean(); $output .= '</span>'; $output .= "<span class='text-sep text-sep-comment'>/</span>"; // } $taxonomies = get_object_taxonomies( get_post_type( get_the_ID() ) ); $cats = ''; $excluded_taxonomies = array_merge( get_taxonomies( array( 'public' => false ) ), array('post_tag','post_format') ); $excluded_taxonomies = apply_filters( 'avf_exclude_taxonomies', $excluded_taxonomies, get_post_type( get_the_ID() ), get_the_ID() ); if( ! empty( $taxonomies ) ) { foreach( $taxonomies as $taxonomy ) { if( ! in_array( $taxonomy, $excluded_taxonomies ) ) { $cats .= get_the_term_list( get_the_ID(), $taxonomy, '', ', ', '' ) . ' '; } } } if( ! empty( $cats ) ) { $output .= '<span class="blog-categories minor-meta">' . __( 'in','avia_framework' ) . ' '; $output .= $cats; $output .= '</span><span class="text-sep text-sep-cat">/</span>'; } $output .= '<span class="blog-author minor-meta">' . __( 'by','avia_framework' ) . ' '; $output .= '<span class="entry-author-link" >'; $output .= '<span class="vcard author"><span class="fn">'; $output .= get_the_author_posts_link(); $output .= '</span></span>'; $output .= '</span>'; $output .= '</span>'; $output .= '</span>'; $output .= '</div>'; return $output; } add_shortcode( 'post_meta_infos', 'enfold_post_meta_infos' );
Then use this shortcode: [post_meta_infos]
Hope it helps :)Best regards,
NikkoFebruary 25, 2020 at 9:56 am #1187627AWESOME!
Thanks!February 25, 2020 at 2:44 pm #1187698Hi alex,
We’re glad that we could help :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Blog Detail-Page and Layout Architect’ is closed to new replies.