-
AuthorPosts
-
November 6, 2013 at 2:55 am #185028
Looking for a way to disable the Previous and Next arrows that show on the sides of a post.
Can this only be done globally or can the control be left to the individual post where a toggle could be added on the post page?
Not a feature request just an idea if the only option is all or nothing.Anyway…how does one remove the previous and back links?
Thanks in advanceNovember 6, 2013 at 4:54 pm #185231Hey Monsoon!
Please add following code to Quick CSS in Enfold theme options under Styling tab
#top .avia-post-nav { display: none; }
Best regards,
YigitJanuary 29, 2014 at 11:38 pm #216672Hi Yigit,
The Quick CSS you offered to Monsoon worked great for disabling the Previous and Next arrows on the sides of posts globally. However, is it possible to disable it for custom posts (e.g., WooCommerce shop products or Events Planner events) but keep it enabled for regular posts (i.e., blog)?
Thanks in advance.
January 30, 2014 at 3:53 am #216751Hi!
You can add following code to Quick CSS to remove only from single product pages
.single-product .avia-post-nav { display: none!important; }
Regards,
YigitMarch 15, 2014 at 6:59 pm #238118Hello,
I have read this post with interest.
Anyway, how could such structure be completely removed, so that the code is lighter?
Could you please indicate which files are to be edited?
Thank you.
March 16, 2014 at 4:11 am #238172Hey!
You can find the avia post navigation functions on functions-enfold.php:
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($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, 'thumbnail'); $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'>".avia_backend_truncate(get_the_title($entry->ID),75," ")."</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; } }
Best regards,
IsmaelMarch 17, 2014 at 9:58 am #238574Thank you Ismael,
I commented out as follow, and apparently it works in /enfold/functions-enfold.php…
in the code block starting as… if(!function_exists(‘avia_post_nav’))
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’]);
}Thank you for your assistance.
-
AuthorPosts
- The topic ‘Enfold – Disable previous and next post arrows on posts’ is closed to new replies.