Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #713716

    Hi,

    How is it possible to edit the code for Featured image slider on this demo http://kriesi.at/themes/enfold-lifestyle-blog/ and add categories links above the post title? Which php file do I have to edit and which lines?

    Thanks

    #714823

    Hi L!

    I think it’s possible, you need to edit this file slideshow_feature_image.php found in Enfold/config-templatebuilder/avia-shortcodes/ folder. The post title is located in line 545:
    $caption .= ' <h2 class="avia-caption-title"><a href="'.$link.'">'.$title.'</a></h2>';
    you should modify on top of that.

    Just a quick reminder, since you will be modifying files in advanced layout builder and any customization in Enfold (parent theme) will be overwritten during a theme update, I suggest following the instructions here: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Best regards,
    Nikko

    #714871

    Thanks Nikko,

    I have added a line above the one you mentioned to test if it will work: $caption = ‘ <h3 class=”avia-caption-title”>TEST</h3>’;
    It shows “TEST” above the title, so it will work. The question is – how do I get category link and name onto this line?

    Here is the whole section of code that I have now:

    foreach ($this->entries->posts as $slide)
    			{
    					$counter ++;
    					$thumb_id = get_post_thumbnail_id( $slide->ID );
    					$slide_class = "";
    					$taxonomies  = get_object_taxonomies(get_post_type($the_id));
    					
    					$img 	 = wp_get_attachment_image_src($thumb_id, $this->atts['image_size']);
    					$link	 = get_permalink( $slide->ID );
    					$title	 = get_the_title( $slide->ID );
    					
    					
    					$caption  = "";
     					$caption .= ' <div class="caption_fullwidth av-slideshow-caption caption_center">';
    					$caption .= ' <div class="container caption_container">';
    					$caption .= ' <div class="slideshow_caption">';
    					$caption .= ' <div class="slideshow_inner_caption">';
    					$caption .= ' <div class="slideshow_align_caption">';
    					$caption .= ' <h3 class="avia-caption-title">TEST</h3>';
    					$caption .= ' <h2 class="avia-caption-title"><a href="'.$link.'">'.$title.'</a></h2>';
    			
    					if(strpos($this->atts['contents'], 'excerpt')  !== false)
    					{
    						$excerpt = !empty($slide->post_excerpt) ? $slide->post_excerpt : avia_backend_truncate($slide->post_content, apply_filters( 'avf_feature_image_slider_excerpt_length' , 320) , apply_filters( 'avf_feature_image_slider_excerpt_delimiter' , " "), "…", true, '');
    						
    						if(!empty($excerpt)){
    							$caption .= ' <div class="avia-caption-content " itemprop="description">';
    							$caption .= wpautop($excerpt);
    							$caption .= ' </div>';
    						}
    					}
    		
    					
    					if(strpos($this->atts['contents'], 'read_more')  !== false)
    					{
    						$caption .= ' <a href="'.$link.'" class="avia-slideshow-button avia-button avia-color-light " data-duration="800" data-easing="easeInOutQuad">'.__('Read more', 'avia_framework').'</a>';
    					
    					}
    					$caption .= ' </div>';
    					$caption .= ' </div>';
    					$caption .= ' </div>';
    					$caption .= ' </div>';
    					$caption .= $this->create_overlay();
    					$caption .= ' </div>';
    					
    					$slide_data = "data-img-url='".$img[0]."'";
    					
    					if(empty($img)) $slide_class .= " av-no-image-slider";
    					
    					$html .= "<li {$slide_data} class='slide-{$counter} {$slide_class} slide-id-".$slide->ID."'>";
    					$html .= $caption;
    					$html .= "</li>";
    			}
    #715868

    Hi!

    Please replace your whole code with this one: http://pastebin.com/LLLxLFGT
    Let us know if it works fine :)

    Best regards,
    Nikko

    #716177

    Thanks Nikko! It worked! You should add this option for future updates.

    Best regards

    #716192

    Hi!

    You an always suggest that on the following link:

    Let us know if we can do anything else for you

    Cheers!
    Basilis

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