-
AuthorSearch Results
-
January 30, 2016 at 12:09 am #574836
In reply to: meta for Grid
Hey!
Look in /config-templatebuilder/avia-shortcodes/postslider.php, line 430-449:
if($show_meta && !empty($excerpt)) { $meta = "<div class='slide-meta'>"; $meta .= "<div class='slide-author'>".get_the_author()."</div><div class='slide-meta-del'>/</div>"; 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>"; if($blogstyle !== "elegant-blog") { $output .= $meta; $meta = ""; } }Best regards,
JosueJanuary 24, 2016 at 10:30 pm #570932In reply to: Caption under image in Lightbox view?
Hey!
There’s no real connection between the Portfolio item and the full size image other than the -explicitly set- URL (custom link). However, you can get the “featured image” (thumbnail) associated with that Portfolio item and show the title of that attachment instead.
function custom_link_structure($link_markup, $entry){ $the_id = $entry->ID; $custom_link = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $the_id ,'_portfolio_custom_link_url', true) : false; $link = !empty($custom_link) ? $custom_link : get_permalink($the_id); $title = get_post(get_post_thumbnail_id($the_id))->post_title; $link_markup[0] = "a href='{$link}' title='{$title}' "; return $link_markup; } add_filter('avf_portfolio_custom_image_container', 'custom_link_structure', 10, 2);Regards,
Josue-
This reply was modified 9 years, 11 months ago by
Josue.
January 24, 2016 at 10:15 pm #570920In reply to: Caption under image in Lightbox view?
Hi!
Check it now, i added this code to child theme functions.php:
function custom_link_structure($link_markup, $entry){ $the_id = $entry->ID; $custom_link = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $the_id ,'_portfolio_custom_link_url', true) : false; $link = $custom_link !== "" ? $custom_link : get_permalink($the_id); $link_markup[0] = "a href='{$link}' title='{$entry->post_title}' "; return $link_markup; } add_filter('avf_portfolio_custom_image_container', 'custom_link_structure', 10, 2);Best regards,
JosueDecember 2, 2015 at 7:16 pm #546057Hey!
Hmm, I did some testing on my XAMPP setup and I could only get it to work with this for some reason.
if(!function_exists('avia_post_nav')) { function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; //dont display if a fullscreen slider is available since they overlap if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true; $settings['type'] = get_post_type(); $settings['taxonomy'] = ($settings['type'] == 'portfolio') ? 'portfolio_entries' : $taxonomy; if(!is_singular() || is_post_type_hierarchical($settings['type'])) $settings['is_hierarchical'] = true; if($settings['type'] === 'topic' || $settings['type'] === 'reply') $settings['is_bbpress'] = true; $settings = apply_filters('avia_post_nav_settings', $settings); if(!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) return; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['prev'] = get_previous_post(true, $settings['excluded_terms'], 'product_cat'); $entries['next'] = get_next_post(true, $settings['excluded_terms'], 'product_cat'); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if(empty($entry)) continue; $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' ".av_icon_string($key)."></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; } }You can paste that into the child theme functions.php file.
Cheers!
ElliottDecember 1, 2015 at 6:35 pm #545460In reply to: remove thumbnail in avia post nav
First solution: Putting this one in the child theme of your Function
function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; //dont display if a fullscreen slider is available since they overlap if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true; $settings['type'] = get_post_type(); $settings['taxonomy'] = ($settings['type'] == 'portfolio') ? 'portfolio_entries' : $taxonomy; if(!is_singular() || is_post_type_hierarchical($settings['type'])) $settings['is_hierarchical'] = true; if($settings['type'] === 'topic' || $settings['type'] === 'reply') $settings['is_bbpress'] = true; $settings = apply_filters('avia_post_nav_settings', $settings); if(!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) return; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if(empty($entry)) continue; $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' ".av_icon_string($key)."></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if($image) $tc2 = " "; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; }November 15, 2015 at 9:51 am #536040I would suggest using a Quick CSS for that
.slide-meta { display: none; }But if you want to remove it from the code you’d need to edit /config-templatebuilder/avia-shortcodes/postslider.php, delete this block of code (431-441):
$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>";Regards,
JosueNovember 12, 2015 at 5:08 pm #534902Hey george!
We can point you in the right direction for this but to get it looking exactly like your screenshot would take a lot of time and code and would have to be considered custom work.
Around line 140 in the /enfold/includes/loop-index.php file you can see where the small preview image is displayed.
$blog_meta_output = "<a href='{$link}' class='small-preview' title='{$featured_img_desc}'>".$slider.$icon."</a>";What your wanting is to replace that with the date so you can keep using the_time(), https://codex.wordpress.org/Function_Reference/the_time, to display certain parts of the date to create that look.
Cheers!
ElliottOctober 1, 2015 at 8:30 am #511991In reply to: Structured Data testing Datepublised missing
Hi!
Sorry for the delay. Please edit comments.php file, look for this code around line 70:
<div class='comment_container'>.. replace it with:
<div class='comment_container' itemscope='itemscope' itemtype='https://schema.org/UserComments'>Modify includes > loop-index.php, look for this code on line 109:
if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';Below, add this:
echo "<meta itemprop='image' content='{$link}'></meta>";Cheers!
IsmaelSeptember 29, 2015 at 5:37 pm #510883In reply to: Link Format Titles to link External links
Hey!
You can find the link on line 529 in the /enfold/config-templatebuilder/avia-shortcodes/magazine.php file.
$title = "<a href='{$link}' {$titleAttr}>".get_the_title($entry->ID)."</a>";Perhaps you can add a custom field to each post with the external URL and then grab it with get_post_meta, https://developer.wordpress.org/reference/functions/get_post_meta/.
Best regards,
ElliottSeptember 29, 2015 at 11:25 am #510676Sorry… the code is this:
$output .= $thumbnail ? "<a href='{$link}' rel='lightbox' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";September 29, 2015 at 11:15 am #510673victormontesdeoca
ParticipantHi Team!
Im using a post-slider like a agenda that only shows the flyer of the event, title and date… thats all fine
What I want is to not have a internal post, just to open a lightbox with the flyer when user clicks the tumbnail…
So, i did this in postslider.php:$output .= $thumbnail ? “{$thumbnail}” : “”;
Now it opens in the lightbox but appears an error… I know I need to change the href='{$link}’ for something like $imageURL… but it do not work…
Any help?
Thanks a lot!!September 5, 2015 at 10:42 pm #498736In reply to: Add 'rel="nofollow" to Promo Box
Hey Vincent!
Your talking about the button of the promobox correct? Try adding it to line 285 in the /enfold/config-templatebuilder/avia-shortcodes/button.php file.
$output .= "<a rel = 'nofollow' href='{$link}' class='avia-button {$extraClass} ".$this->class_by_arguments('icon_select, color, size, position' , $atts, true)."' {$blank} {$style} >";Best regards,
ElliottSeptember 3, 2015 at 5:03 pm #497800In reply to: Blog author gravatar hyperlink
Hey Aristidis!
On line 130 in the /enfold/includes/loop-index.php file you should see this.
$blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>";Change it to this.
$blog_meta_output = "<span class='rounded-container'>".$gravatar.$icon."</span>";Best regards,
ElliottAugust 4, 2015 at 4:21 pm #482798In reply to: Individual gallery arrows in portfolio are backwards
Hi!
Please copy the whole function to from functions-enfold.php file to your child themes functions.php file as following
`function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; //dont display if a fullscreen slider is available since they overlap if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true; $settings['type'] = get_post_type(); $settings['taxonomy'] = ($settings['type'] == 'portfolio') ? 'portfolio_entries' : $taxonomy; if(!is_singular() || is_post_type_hierarchical($settings['type'])) $settings['is_hierarchical'] = true; if($settings['type'] === 'topic' || $settings['type'] === 'reply') $settings['is_bbpress'] = true; $settings = apply_filters('avia_post_nav_settings', $settings); if(!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) return; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if(empty($entry)) continue; $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' ".av_icon_string($key)."></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; }`and apply the changes as it was suggested in Elliott’s link.
Cheers!
YigitJuly 31, 2015 at 1:22 pm #481299Topic: Upcoming Events module – Event-category as css-class?!
in forum EnfoldJens
ParticipantHi,
I relate to a question from “levitivus” from october 2014. He asked if it’s possible to add the name of the event-category as css-class for each list item in the Upcoming Events module.
I’m also interested in this point and tried already a lot with my little php-knowledge. The following code generates roughly what I want. The ID of the event-list item is shown as css-class and all event-categories are also shown as class-items for each list-item.$terms = get_terms("tribe_events_cat"); $count = count($terms); if ( $count > 0 ){ foreach ( $terms as $term ) { $event_class .= ' '.'category-'.$term->slug.' '; } } $output .= "<a href='{$link}' class='{$class} {$event_class}'>";I’m trying hard to find a solution that generates only the appropriate event-category-name as css-class for each list-item in the Upcoming events module, but I didn’t find it by myself.
I’d be very grateful, if someone can help me out with this.
Thx in advance!-
This topic was modified 10 years, 5 months ago by
Jens.
Hello Ismael,
You can see in bold what i add and modify (in magazine.php).
regards$markupEntry = avia_markup_helper(array('context' => 'entry','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup'])); $markupTitle = avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup'])); $markupContent = avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup'])); $markupTime = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup'])); $format = get_post_format($entry->ID) ? get_post_format($entry->ID) : 'standard'; $type = get_post_type($entry->ID); $icontype = $type == 'post' ? $format : $type; $icon = "<a href='{$link}' {$titleAttr} class='iconfont av-magazine-entry-icon' ".av_icon_string($icontype)."></a>"; $extraClass = ""; <strong>$test=get_post($entry->ID); $test = preg_split( '/<!--more(.*?)?-->/', $test->post_content );</strong> if($style == 'small') { if(empty($this->atts['thumbnails'])) { $image = ""; $extraClass = "av-magazine-no-thumb"; } } else { $excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, ''); } $output .= "<article class='hentry av-magazine-entry av-magazine-entry-id-".$entry->ID." av-magazine-format-{$format} av-magazine-type-{$type} av-magazine-entry-".$entry->loop." av-magazine-entry-".$style." {$extraClass}' {$markupEntry}>"; if($this->atts['thumbnails'] || ($style == 'big' && $image)) { $output .="<div class='av-magazine-thumbnail'>"; if($image) $output .="<a href='{$link}' {$titleAttr} class='av-magazine-thumbnail-link '>{$image}</a>"; if(!$image) $output .= $icon; $output .="</div>"; } $output .= "<div class='av-magazine-content-wrap'>"; $output .= "<header class='entry-content-header'>"; $output .= "<time class='av-magazine-time updated' {$markupTime}>".$time."</time>"; $output .= $separator.$author_output; $output .= "<{$titleTag} class='av-magazine-title entry-title' {$markupTitle}>{$title}</{$titleTag}>"; $output .= "</header>"; if($excerpt)$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{<strong>$test[0]</strong>}</div>"; $output .= "</div>"; $output .= "<footer class='entry-footer'></footer>"; $output .= "</article>"; return $output;July 21, 2015 at 5:18 pm #476630In reply to: Taxonomy en categories Postslider
Hey ErikHummel!
The area your looking for is line 386 in /enfold/config-templatebuilder/avia-shortcodes/postslider.php.
$output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>" : '';On the next line you could use this to display the categories.
$categories = get_the_category($the_id); if ( ! empty( $categories ) ) { $output .= '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>'; }Cheers!
Elliott-
This reply was modified 10 years, 5 months ago by
Elliott.
July 14, 2015 at 4:59 pm #473304Hey!
In the portfolio.php file try changing line 721 from this.
$output .= "<h2 class='portfolio-preview-title entry-title' $markup><a href='{$link}'>".$entry->post_title."</a></h2>";To this.
$output .= "<h2 class='portfolio-preview-title entry-title' $markup>".$entry->post_title."</h2>";Cheers!
ElliottJuly 10, 2015 at 4:26 pm #471570In reply to: Testimonial Author Position and Color
Hey!
Please change the code in testimonials.php file to following one
$output .= "<div class='avia-testimonial-meta'><div class='avia-testimonial-arrow-wrap'><div class='avia-arrow'></div></div>"; if(!$grid) $output .= $avatar; $output .= "<div class='avia-testimonial-meta-mini'>"; if($name) $output .= "<strong class='avia-testimonial-name' {$this->title_styling} {$markup_name}>{$name}</strong>"; if($subtitle) $output .= "<span class='avia-testimonial-subtitle {$this->subtitle_class}' {$this->title_styling} {$markup_job}>{$subtitle}</span>"; if($link) $output .= "<span class='hidden avia-testimonial-markup-link' {$markup_url}>{$link}</span>"; if($link) $output .= " – <a class='aviablank avia-testimonial-link' href='{$link}' >{$linktext}</a>"; $output .= "</div>"; $output .= "<div class='avia-testimonial-content {$this->content_class}' {$this->content_styling} {$markup_text}>"; $output .= "</div>";Cheers!
Yigit-
This reply was modified 10 years, 6 months ago by
Yigit.
July 6, 2015 at 3:11 pm #468981In reply to: Testimonial Author Position and Color
Hey!
Please go to Enfold/config-templatebuilder/avia-shortcodes and open testimonials.php file and find
$output .= "<div class='avia-testimonial-content {$this->content_class}' {$this->content_styling} {$markup_text}>"; $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)); $output .= "</div>"; $output .= "<div class='avia-testimonial-meta'><div class='avia-testimonial-arrow-wrap'><div class='avia-arrow'></div></div>"; if(!$grid) $output .= $avatar; $output .= "<div class='avia-testimonial-meta-mini'>"; if($name) $output .= "<strong class='avia-testimonial-name' {$this->title_styling} {$markup_name}>{$name}</strong>"; if($subtitle) $output .= "<span class='avia-testimonial-subtitle {$this->subtitle_class}' {$this->title_styling} {$markup_job}>{$subtitle}</span>"; if($link) $output .= "<span class='hidden avia-testimonial-markup-link' {$markup_url}>{$link}</span>"; if($link) $output .= " – <a class='aviablank avia-testimonial-link' href='{$link}' >{$linktext}</a>"; $output .= "</div>"; $output .= "</div>";and change it to
$output .= "<div class='avia-testimonial-meta'><div class='avia-testimonial-arrow-wrap'><div class='avia-arrow'></div></div>"; if(!$grid) $output .= $avatar; $output .= "<div class='avia-testimonial-meta-mini'>"; if($name) $output .= "<strong class='avia-testimonial-name' {$this->title_styling} {$markup_name}>{$name}</strong>"; if($subtitle) $output .= "<span class='avia-testimonial-subtitle {$this->subtitle_class}' {$this->title_styling} {$markup_job}>{$subtitle}</span>"; if($link) $output .= "<span class='hidden avia-testimonial-markup-link' {$markup_url}>{$link}</span>"; if($link) $output .= " – <a class='aviablank avia-testimonial-link' href='{$link}' >{$linktext}</a>"; $output .= "</div>"; $output .= "</div>"; $output .= "<div class='avia-testimonial-content {$this->content_class}' {$this->content_styling} {$markup_text}>";and then refer to this post to move it to your child theme – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
and add following code to Quick CSS in Enfold theme options under General Styling tab to change authors name color.avia-testimonial-name { color: orange!important; }Cheers!
YigitJune 10, 2015 at 12:48 pm #457154In reply to: Remove Sidebar on a Custom Post Type
Hi!
Did you use the Grid Layout? If yes, please edit config-templatebuilder >avia-shortcodes > postslider.php, look for this code around line 367:
$output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";Replace it with:
$target = strpos($entry->post_content, 'http') === 0 ? '_blank' : ''; $output .= $thumbnail ? "<a href='{$link}' target='{$target}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";Make sure that you place the link at the very beginning of the post content. Use full or absolute url, sample:
http://www.mypage.com/pageIf it works, please create a change log or note for this modification in case you update the theme.
Cheers!
IsmaelJune 8, 2015 at 9:26 am #455827Hi chanleo!
Thank you for using Enfold.
Edit config-templatebuilder > avia-shortcodes > logoslider.php, look for this code:
$output .= "<div {$single_data} class='slide-entry flex_column no_margin {$post_class} {$grid} {$extraClass} {$thumb_class}'>"; $output .= !empty($link) ? "<a href='{$link}' data-rel='slide-".avia_partner_logo::$slider."' class='slide-image' title='{$linktitle}' {$blank} >{$img}</a>" : $img;Replace it with:
$output .= "<div class='slide-entry flex_column no_margin {$post_class} {$grid} {$extraClass} {$thumb_class}'>"; $output .= !empty($link) ? "<a href='{$link}' data-rel='slide-".avia_partner_logo::$slider."' class='slide-image' title='{$linktitle}' {$blank} >{$img}</a>" : $img; $output .= "<div class='custom-tooltip'>{$hover}</div>";Please create a change log of this modifications in case you update the theme.
Best regards,
IsmaelJune 3, 2015 at 3:48 pm #453866In reply to: Portfolio Arrows issue
Hi!
Delete the functions-enfold.php file in the child theme and then try to copy the whole avia_post_nav function in the child theme’s functions.php file:
function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; //dont display if a fullscreen slider is available since they overlap if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true; $settings['type'] = get_post_type(); $settings['taxonomy'] = ($settings['type'] == 'portfolio') ? 'portfolio_entries' : $taxonomy; if(!is_singular() || is_post_type_hierarchical($settings['type'])) $settings['is_hierarchical'] = true; if($settings['type'] === 'topic' || $settings['type'] === 'reply') $settings['is_bbpress'] = true; $settings = apply_filters('avia_post_nav_settings', $settings); if(!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) return; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['next'] = get_previous_post($settings['same_category']); $entries['prev'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if(empty($entry)) continue; $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' ".av_icon_string($key)."></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; }Regards,
IsmaelMay 28, 2015 at 6:35 am #450922In reply to: move category before title in content slider
Hey Nic!
You’d need to edit /config-templatebuilder/avia-shortcodes/postslider.php, basically move these three lines:
$output .= '<header class="entry-content-header">'; $output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>" : ''; $output .= '</header>';Below:
if($show_meta && !empty($excerpt)) { .... }Regards,
JosueMay 25, 2015 at 7:43 pm #449692In reply to: AUTHOR NAME & CATEGORY IN BLOG POSTS
Hi Elliot,
Your code is not working, and even makes my site crash when I try to Login.
We do not have the same code in lines 377-387; my postslider.php has these:
$output .= "<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' ); $output .= "<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)); $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>"; $output .= "</div>";Please help me solve this problem,
Regards,
Chapdes
May 22, 2015 at 11:56 pm #448730Hi,
There is no option for that yet, you’d need to edit the code that generates this shortcode, open /config-templatebuilder/avia-shortcodes/iconbox.php and look for line 311:
$title = "<a href='{$link}' title='".esc_attr($linktitle)."' $blank>$linktitle</a>";Replace it by this:
$title = "<a href='{$link}' rel='nofollow' title='".esc_attr($linktitle)."' $blank>$linktitle</a>";Regards,
JosueMay 20, 2015 at 5:13 pm #447297In reply to: Remove "Comments", replace with Author Name
Hey MMA_Impact!
Open up /enfold/config-templatebuilder/avia-shortcodes/postslider.php and change line 383 from this.
$output .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>";To this.
$output .= "<div class='slide-meta-comments'>".get_the_author()."</div><div class='slide-meta-del'>/</div>";Regards,
ElliottMay 6, 2015 at 5:54 pm #440536In reply to: Hide image title in masonry blog
Hi happinessplunge!
It looks like switched the style and are not using the Masonry anymore. To remove it in your current style open up /enfold/includes/loop-index.php and change line 134 from this.
$blog_meta_output = "<a href='{$link}' class='small-preview' title='{$featured_img_desc}'>".$slider.$icon."</a>";To this.
$blog_meta_output = "<a href='{$link}' class='small-preview'>".$slider.$icon."</a>";Best regards,
ElliottApril 16, 2015 at 4:51 pm #429736Hi!
Open up /enfold/config-templatebuilder/avia-shortcodes/magazine.php and around line 529 you should see this.
$title = "<a href='{$link}' {$titleAttr}>".get_the_title($entry->ID)."</a>";Add this beneath it.
$post_content = get_post($entry->ID); if ( get_post_format($entry->ID) == 'link' ) { $title = "<a href='".$post_content->post_content."' {$titleAttr}>".get_the_title($entry->ID)."</a>"; }Best regards,
ElliottApril 14, 2015 at 5:29 pm #428357In reply to: Remove link on titles in Ajax portfolio
Hey!
Thank you for coming back.
I found a solution – Added an empty link before the headline:
$output .= "<h2 class='portfolio-preview-title entry-title' $markup><a href='{$link}'></a></h2>"; $output .= "<h2 class='portfolio-preview-title entry-title' $markup>".$entry->post_title."</h2>";I hope, it will work now.
Cheers!
Günter -
This reply was modified 9 years, 11 months ago by
-
AuthorSearch Results
-
Search Results
-
Hi,
I relate to a question from “levitivus” from october 2014. He asked if it’s possible to add the name of the event-category as css-class for each list item in the Upcoming Events module.
I’m also interested in this point and tried already a lot with my little php-knowledge. The following code generates roughly what I want. The ID of the event-list item is shown as css-class and all event-categories are also shown as class-items for each list-item.$terms = get_terms("tribe_events_cat"); $count = count($terms); if ( $count > 0 ){ foreach ( $terms as $term ) { $event_class .= ' '.'category-'.$term->slug.' '; } } $output .= "<a href='{$link}' class='{$class} {$event_class}'>";I’m trying hard to find a solution that generates only the appropriate event-category-name as css-class for each list-item in the Upcoming events module, but I didn’t find it by myself.
I’d be very grateful, if someone can help me out with this.
Thx in advance!
