Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #910702

    Something happened to my site and all the work yo did to make my Previous and Back buttons are gone. I know- shame on me. Just wondering if I would find that code in my css? or functions? if I look in the backup.

    note – #882074 was closed- so I am writing you here

    #911000

    Hey KK,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #911252

    SURE

    #911524

    Hi,

    Thank you for the info.

    We added the modified nav function again in the functions.php file.

    add_filter('avf_template_builder_content', 'avf_template_builder_content_mod_nav');
    function avf_template_builder_content_mod_nav( $content ) {
    	if( is_singular('portfolio') ) {
    		$nav = avia_post_nav_mod(false, 'portfolio_entries');
    		$content = $content . $nav;
    	}
    	return $content;
    }
    
    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;
    	}
    }

    And added a few css modifications in the style.css file.

    .single-portfolio .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);
    }
    
    .single-portfolio .avia-post-prev {
        left: 0;
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
        width: 50%;
        float: left;
    }
    
    .single-portfolio .avia-post-nav {
        display: none;
    }

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.