Tagged: previous / next
-
AuthorPosts
-
November 27, 2017 at 3:06 am #882074
HI
I thought this would be easy to find, but I can’t figure it out.I would like the bottom of my (single) portfolio page to display a thumbnail of the upcoming portfolio page “next” and an image of the last page to display for “previous”
something like this https://ibb.co/dxiSk6
but nicer (it’s the only example I could find real quickly)my typical portfolio page: https://specialmoderndesign.com/projects/01-cake-monkey-bakery/
November 28, 2017 at 3:46 am #882475Hey KK,
Thank you for using Enfold.
Please look for the avia_post_nav function in the functions-enfold.php file. Copy the code, change the name then modify as needed.
Best regards,
IsmaelDecember 4, 2017 at 8:01 pm #884759I can’t find that.
I think I am looking for a more obvious prev-next buttons than the hidden ones.
maybe it’s a plugin? does anyone know?
something like this https://ibb.co/dxiSk6December 5, 2017 at 2:52 pm #885080Hi,
What you’re looking for is the same as the “avia_post_nav”. It’s in the “functions-enfold.php” file, not “functions.php” file. Please refer to the documentation.
// https://codex.wordpress.org/Next_and_Previous_Links
You can try the following plugin.
// https://wordpress.org/plugins/wp-post-navigation/
Best regards,
IsmaelJanuary 14, 2018 at 5:29 am #897021This is not working for me on the portfolio pages at all. I may have a plugin conflict or I am not using it correctly.
January 17, 2018 at 7:04 am #898301Hi,
Please add the following code in the functions.php file.
if(!function_exists('avia_post_nav_mod')) { function avia_post_nav_mod($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-mod 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; } }
Edit the includes > loop-portfolio-single.php file, look for this code around line 47.
echo '</footer>';
Below, add this code:
echo avia_post_nav_mod(false, 'portfolio_entries');
And then adjust the default style in the Quick CSS field.
#top .avia-post-nav-mod { display: block; position: relative; height: 110px; background: #aaa; background: rgba(0,0,0,0.1); color: #fff; padding: 15px; text-decoration: none; z-index: 501; -webkit-transform: translate3d(0,0,0); } .avia-post-prev { left: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; width: 50%; float: left; }
This modification should work but it will require a few css adjustments. I’m sure you’ll be able to handle that.
Best regards,
IsmaelJanuary 17, 2018 at 8:16 am #898330thanks! I think I can handle some CSS but I got stuck right after the first step. I was able to input the first code into functions.php.
This is where i was unsure what to do.
“Edit the includes > loop-portfolio-single.php file, look for this code around line 47.”January 18, 2018 at 8:23 pm #899287I know this is complex and I have been looking for plugins, but at the same time to my eyes, it should be simpler???
anyway– it’s the only thing holding me back from launching as my portfolio pages have no < > navigation.(I’m still trying to understand what you sent)
January 18, 2018 at 11:26 pm #899336I’ll settle for breadcrumbs right now. I can’t get them to activate!
January 20, 2018 at 2:51 am #899934Hi,
Please post the FTP login details in the private field so that we can modify the templates properly.
Best regards,
IsmaelJanuary 20, 2018 at 3:05 am #899937thank you!!
January 20, 2018 at 4:46 am #899972Hi,
I’m sorry but the login credentials are not working. Are you sure of the ftp url?
Best regards,
IsmaelJanuary 20, 2018 at 7:54 am #900037so sorry
try this- This reply was modified 6 years, 10 months ago by kbarranco.
January 22, 2018 at 3:36 am #900527Hi,
I’m sorry it is still not working. Please check it carefully.
Best regards,
IsmaelJanuary 22, 2018 at 4:27 am #900549ok-
here is my cpanel login:
this is what I use.I will contact bluehost to confirm
January 23, 2018 at 5:06 am #901143Hi,
I forgot to ask for the WP login details. Please note that this modification will only work if you’re using the default editor. It’s not going to work for the ALB.
Best regards,
IsmaelJanuary 23, 2018 at 8:26 am #901268ok well- I don’t think it will work then because I built the pages in the builder.
January 24, 2018 at 3:32 am #901838Hi,
The post navigations are now rendering below the portfolio item content but it requires a few css adjustments. ( see private field )
Best regards,
IsmaelJanuary 24, 2018 at 5:13 am #901892You are incredible! and so patient with me. I appreciate it. I will get the CSS sorted out. thanks!!!!\
January 25, 2018 at 5:44 am #902551 -
AuthorPosts
- The topic ‘PREVIOUS and NEXT button with portfolio thumbnail’ is closed to new replies.