Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #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/

    #882475

    Hey 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,
    Ismael

    #884759

    I 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/dxiSk6

    #885080

    Hi,

    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,
    Ismael

    #897021

    This is not working for me on the portfolio pages at all. I may have a plugin conflict or I am not using it correctly.

    #898301

    Hi,

    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,
    Ismael

    #898330

    thanks! 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.”

    #899287

    I 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)

    #899336

    I’ll settle for breadcrumbs right now. I can’t get them to activate!

    #899934

    Hi,

    Please post the FTP login details in the private field so that we can modify the templates properly.

    Best regards,
    Ismael

    #899937

    thank you!!

    #899972

    Hi,

    I’m sorry but the login credentials are not working. Are you sure of the ftp url?

    Best regards,
    Ismael

    #900037

    so sorry
    try this

    • This reply was modified 6 years, 10 months ago by kbarranco.
    #900527

    Hi,

    I’m sorry it is still not working. Please check it carefully.

    Best regards,
    Ismael

    #900549

    ok-
    here is my cpanel login:
    this is what I use.

    I will contact bluehost to confirm

    #901143

    Hi,

    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,
    Ismael

    #901268

    ok well- I don’t think it will work then because I built the pages in the builder.

    #901838

    Hi,

    The post navigations are now rendering below the portfolio item content but it requires a few css adjustments. ( see private field )

    Best regards,
    Ismael

    #901892

    You are incredible! and so patient with me. I appreciate it. I will get the CSS sorted out. thanks!!!!\

    #902551

    Hi,

    Glad we could help. And thank you for being patient yourself. Please feel free to open a new thread if you need anything else.

    Best regards,
    Ismael

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘PREVIOUS and NEXT button with portfolio thumbnail’ is closed to new replies.