Forum Replies Created
-
AuthorPosts
-
Thank you Nikko, the site is working again!
June 27, 2014 at 4:10 am in reply to: Set Avia Post Nav to only navigate between posts of the same category #284378Hi Josue,
And thanks for the direction!
I also needed to customize some of the text in the <h4 class=’proj-nav-title’> of the post nav tabs so I ended up copying the whole
avia_post_nav function into my child theme’s functions.php to do that customization and then set $same_category parameter to “true”:if(!function_exists('avia_post_nav')) { function avia_post_nav($same_category = true, $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; $tc1 = $tc2 = ""; $link = get_permalink($entry->ID); $image = get_the_post_thumbnail($entry->ID, 'square'); $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'>"; $tc3 .= " <h4 class='proj-nav-title'>View Another Project</h4>"; $tc1 = " <p class='entry-title'>".avia_backend_truncate(get_the_title($entry->ID),75," ")."</p>"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc3.$tc1.$tc2 : $tc2.$tc3.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; } }
Hi Dude, and thanks for the pointer.
Unfortunately that bit of code does not work for me. The function is adding a ‘category-‘ class to my body tag, but it either isn’t able to find the category slug, or it isn’t able to add it to the class name:
function add_category_name($classes = '') { if(is_single()) { $category = get_the_category(); $classes[] = 'category-'.$category[0]->slug; } return $classes; } add_filter('body_class','add_category_name');
June 5, 2014 at 5:11 am in reply to: Disable Portfolio Grid Animations When Resizing Browser #274935Hi Ismael and Josue,
That styles disable the movement transition and fade-in animation for the portfolio grid, but it doesn’t prevent the grid images from being first resized, and then repositioned as the browser window is resized. So even though the easing and transitions are off now, the images are still bouncing around as the window is made smaller and larger and I’d like to disable that behavior specifically.
I essentially want to make the portfolio grid columns and thumbnails: http://kriesi.at/themes/enfold/portfolio/portfolio-3-column/
resize and collapse in the same way that the shop items do: http://kriesi.at/themes/enfold/shop/May 23, 2014 at 5:59 am in reply to: Disable Portfolio Grid Animations When Resizing Browser #268989Hi Josue, and thanks for you reply!
The CSS you provided is definitely getting rid of the transition, but the images are still dancing around quite a bit. It looks like the grid images are first being resized and then later repositioned at each breakpoint, and I’d like to be able to turn this off or override that styling so that the grid columns and images are resized with less noticeable movement ( a bit like the video thumbnails on this page: http://animoto.com/#examples ).
Do you know where I can find the style or script that controls that behavior?
-
AuthorPosts