Tagged: advanced layout builder, blog layout, help, post slider
-
AuthorPosts
-
September 12, 2016 at 8:07 pm #685333
Hello.
We have created two blog layouts using the Advanced Layout Builder.
The first correctly displays the content as desired but is limited to one entry as expected and desired.
The second displays multiple entries, in a two column grid, as desired but displays the site’s admin nickname instead of the blog entry’s author nickname.We have modified the postslider.php in a child theme described here http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/. The code from the page is changed here:
if($loop_counter == 1) $output .= "<div class='slide-entry-wrap'>"; $post_format = get_post_format($the_id) ? get_post_format($the_id) : 'standard'; $markup = avia_markup_helper(array('context' => 'entry','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)); $output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}' $markup>"; $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : ""; if($post_format == "audio") { $current_post = array(); $current_post['content'] = $entry->post_content; $current_post['title'] = $entry->post_title; $current_post = apply_filters( 'post-format-'.$post_format, $current_post ); if(!empty( $current_post['before_content'] )) $output .= '<div class="big-preview single-big audio-preview">'.$current_post['before_content'].'</div>'; } $output .= "<div class='slide-content'>"; $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)); $output .= '<header class="entry-content-header">'; if (!empty($title)) { if($show_meta) { $taxonomies = get_object_taxonomies(get_post_type($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($the_id), $the_id); if(!empty($taxonomies)) { foreach($taxonomies as $taxonomy) { if(!in_array($taxonomy, $excluded_taxonomies)) { $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } } } if(!empty($cats)) { $output .= '<span class="blog-categories minor-meta">'; $output .= $cats; $output .= '</span>'; } } $output .= "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>"; $output .= '<span class="av-vertical-delimiter"></span>'; } $output .= '</header>'; if($show_meta && !empty($excerpt)) { $meta = "<div class='slide-meta'>"; //if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio') { // $link_add = $commentCount === "0" ? "#respond" : "#comments"; // $text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' ); // $meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>"; //} $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)); $meta .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>"; //$meta .= "</div>"; $meta .= "<div class='slide-meta-del'>/</div>"; $meta .= "<div class='slide-meta-comments'>By " .get_the_author_posts_link(). "</div>"; if($blogstyle !== "elegant-blog") { $output .= $meta; $meta = ""; } } $markup = avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)); $excerpt = apply_filters( 'avf_post_slider_entry_excerpt', $excerpt, $prepare_excerpt, $permalink, $entry ); $output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>" : ""; $output .= "</div>"; $output .= '<footer class="entry-footer">'; if( !empty($meta) ) $output .= $meta; $output .= '</footer>'; $output .= av_blog_entry_markup_helper( $the_id ); $output .= "</article>"; $loop_counter ++; $post_loop_count ++; $extraClass = ""; if($loop_counter > $columns) { $loop_counter = 1; $extraClass = 'first'; } if($loop_counter == 1 || !empty($last)) { $output .="</div>"; } } $output .= "</div>";
Specifically we are calling the
get_the_author_posts_link()
to display the author post link.What could be the cause of this not displaying as desired?
September 12, 2016 at 9:12 pm #685367Hey Andrea!
Those customisations are outside our support police.
Please consider to hire a freelance, who will be able to assist you further with all those issues.Thanks a lot for your understanding.
Cheers!
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.