Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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,
    Alex

    #1187270

    Hey 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,
    Nikko

    #1187273

    Thanks 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?

    #1187282

    Hi alex,

    Yes, you are correct.

    Best regards,
    Nikko

    #1187319

    Thanks.
    Are there shorcodes etc. from which I can generate a “template”, like “”publishing date”, “category” etc.?

    #1187379

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

    #1187627

    AWESOME!
    Thanks!

    #1187698

    Hi alex,

    We’re glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Blog Detail-Page and Layout Architect’ is closed to new replies.