Lensa Plain Slider

Hi again,

Today i want to share something for your Lensa theme. You maybe want to have a plain slider that only displaying the images (hide the title and description).

To do this modification is very simple, you only have to modify 2 files: index.php and theme-functions.php.


On this first step, open a file named theme-functions.php  and find out this code:

$slide .= "{
          image   :'".colabs_image('link=url&return=true')."',
          title   :'".wptexturize(get_the_title())."',
          url   :'".get_permalink()."',
          caption :'". addslashes( wptexturize(get_the_excerpt()) ). "'

You can find out that code on the end of the file.

Edit that code become:

 $slide .= "{
          image   :'".colabs_image('link=url&return=true')."',


At this step, you have to modify  a file named index.php. Open that file, find out and remove this code:

<div class="slide-info">
        <h2 class="slide-title"><a href="#"></a></h2>
        <div class="slide-caption"></div>

And done! Right now your slider will only displaying the images and also the slide pointer navigation


24 thoughts on “Lensa Plain Slider

  1. Hello! I read your blog and it has been very helpful with Lensa theme. but I have a problem I could not solve, and it is home to the slideshow is not shown.

    The site gives me this message
    slides = [{image: ‘http://sebavillanueva.cl/wp-content/uploads/2014/03/9647287985_22402d4ee8_o.jpg’}

    I searched the solution in the documentation, but I have not achieved anything, if you could help me would really appreciate it!

    • hi Sebastian,

      seems if there is a mistakes when you modify a file named ‘index.php’ or ‘theme-functions.php’. Why don’t you start over with a new Lensa theme?

      Edit your Lensa’s style.css file. Find out this code:

      Author URI: http://colorlabsproject.com
      Version: 1.1.1

      Edit the version number become smaller, for example: 1.1.0. Once you made it, a notification for update will be displayed. Update your theme and all mistakes you made will be replaced by the original files

  2. Hey Tandamerah,

    Thx for these great posts! I was just wondering if there is a way to move down the arrows and text on the slider. I don’t want to remove it but I would like to have it somewhere in the left bottom corner of the page. Also the box of the “explanation” title is very wide, can it just cover the text that is used?

    Thx in advance.


    • hi Nick,

      to move the arrow and the meta (title and excerpt) you can use this code for example:

      .slide-info-wrapper {position: absolute !important; top: 100px; left: -100px;}

      and for the excerpt width, you can use this code:

      .slide-info-wrapper .slide-caption {width: 500px;}
  3. I’d like to move sliders navigation arrows (Lensa theme). And I added
    .slide-info-wrapper {position: absolute !important; top: 100px; left: -100px;}

    Problem is that if you look site from mobile device, navigation arrows disappear… They are not responsive.

    Could you please tell, how I move navigation arrows that they are still responsive?

  4. Hi again. I removed the code

    .slide-info-wrapper .slide-title {display:none;}

    Now my featured post does not show up anymore. I’d previously used one of your changes to show featured post.

    Please do you have any idea why i now have this issue after removing the above code?

  5. I removed the text above and inserted the new texts. Now my slider is unresponsive and is showing a photo that I do not even have starred as “featured” Could this be because I have the latest version of Lensa?

  6. Ok I corrected the problem. I also found all of this information super helpful! 🙂

    For those wondering

    1 – Stop the comments appearing on your pages… Firstly disable in the discussion in the settings, then edit the page you are working on, up the top is something called screen options and you can select discussion and comments there, then scroll down and there is a box to allow comments (this is a standard wordpress thing)

    2 – Slideshow – To add photos to the slideshow, had the photographs in the photograph section. You need to add them one pic per item (I tried putting multiple in the one photograph item and it didn’t work) then the featured ones end up in the slideshow. Just remember to click the star to make it yellow in the list screen

    3 – The Damn galleries…… – For every photo you want to display, you need to make a seperate post. Make sure the category for the posts are the same. This is a pain in the butt when you setting up a site espcially if you have a heap of images to put up. Once you have got this done then you can go to the page you want to be the gallery, change the template to gallery and then up the top, change it to post and select the category to use.

    As I said, this is a pain in the butt, but it seems to be not so bad once you get over this hurdle.

  7. Thanks for the awesome tutorial. May I ask how can I show the whole caption texts on the slide? Pls reply asap. It would be a great help!

    • Hi,

      it is not a great idea, but if you need it you can open a file named ‘theme-functions.php’ (wp-content > themes > lensa > includes). find out this code:

       $large_image_url = wp_get_attachment_url( get_post_thumbnail_id( $bigslider_query->ID ) );
              $slide .= "{                  
                image   :'".$large_image_url."',                
                title   :'".wptexturize(get_the_title())."',
                url   :'$customurl',               
                caption :'". addslashes( wptexturize(get_the_excerpt()) ). "'

      Modify it become:

       $large_image_url = wp_get_attachment_url( get_post_thumbnail_id( $bigslider_query->ID ) );
              $slide .= "{                  
                image   :'".$large_image_url."',                
                title   :'".wptexturize(get_the_title())."',
                url   :'$customurl',               
                caption :'". addslashes( wptexturize(get_the_content()) ). "'
    • Hi,

      the main slider already displaying your max image size. check this code that found inside the ‘theme-functions.php’:

      wp_get_attachment_url( get_post_thumbnail_id( $bigslider_query->ID ) );

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s