-
AuthorPosts
-
July 13, 2016 at 8:40 am #660225
On a single post page, the next and previous arrows are very tiny, hard to see, how can i make them bigger or better show the preview image of the previous and next post by default without having to hover over the arrow with the cursor
July 15, 2016 at 12:50 pm #661226Hey kilimats,
You can add following code to Quick CSS in Enfold theme options under General Styling tab to change its background color
#top .avia-post-nav { background: rgba(255,0,0,0.1); } #top .avia-post-nav:hover { background: rgba(255,0,0,0.8); }
255,0,0 is RGB value of the color and 0.1 is opacity level
Or you can use following code to always display it
.avia-post-nav .entry-info-wrap { width: 240px; }
Best regards,
YigitJuly 15, 2016 at 7:12 pm #661473Great ! almost perfect, how can i remove the featured image from being displayed in the button ?
Or better, how to tell the right NEXT button to show the featured image on the left side of the post title, instead of the right by default. I need to change that because when the mouse doesnt hover over the button, the left arrow shows the post title and the right arrow show the featured image without the post title
July 15, 2016 at 9:06 pm #661532Hi!
Please add following code to Quick CSS as well
.avia-post-nav .entry-image { display: none !important; }
Sorry, i did not understand the second question, can you please elaborate on it?
Best regards,
YigitJuly 15, 2016 at 9:12 pm #661536Let me clarify, please visit the link below, the code did remove the featured image from the arrow button but if you look at the right side NEXT button, the post title doesnt show because its on the left side of the featured image
I’d like to push the featured image to the right side and add the post date to the arrow as well
July 20, 2016 at 3:46 am #662751Hi,
Add this css code to adjust the title alignment of the “next button”:
.avia-post-next.with-image { text-align: left; }
Add this in the functions.php file to display the time:
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'); $time = "<time class='date-container minor-meta updated' >".get_the_time(get_option('date_format'), $entry->ID)."</time>"; $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>$time"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; }
Adjust the position of the date container in the Quick CSS field.
Best regards,
IsmaelJuly 20, 2016 at 4:58 am #662761thanks ! almost there,
How can i display the date right above the post title in the arrow, right now it show beside it and is therefore only fully visible when hovering over the arrow to expand, i want to keep the arrow compact on the sides
also i would like to add the following code to my function.php file to keep things organized instead of the quick CSS box, when i add that code there it crash, how should i format it?
.avia-post-next.with-image { text-align: left; }
how do i remove the post type camera IMAGE icon on the side as seen in the private link ? its taking a lot of real estate and doesnt have any purpose to me
Lastly, i turned off related post lower banner in enfold and WP > Reading pane but it still shows at the bottom, how to take this off?
- This reply was modified 8 years, 5 months ago by yingyang.
July 21, 2016 at 8:50 am #663235Hi!
also i would like to add the following code to my function.php file to keep things organized instead of the quick CSS box, when i add that code there it crash, how should i format it?
That is a css code so you can’t put it in a php file. Add this css code to adjust the position of the date:
.avia-post-next .date-container.minor-meta { position: absolute; left: 20px; } .avia-post-prev .date-container.minor-meta { right: 20px; position: absolute; }
Use this to remove the “camera” icon:
.template-blog .blog-meta { display: none; } .big-preview { display: block; padding: 0 50px 10px 0px; }
For additional inquiry, please create a new thread. Thank you.
Best regards,
IsmaelJuly 21, 2016 at 5:25 pm #663485thank you ! all fixed ! appreciate the help !!!
-
AuthorPosts
- The topic ‘Make Blog Post Previous and Next Arrows bigger’ is closed to new replies.