Replace Featured Image With Slider On Archive Pages

This download includes 3 files which do the following :

  1. The 1st file single.php contains code which enables you to add a slider before the content on any single post.
  2. The 2nd file contains code which enables you to replace the featured image on the blog page template ( page_blog.php ) or any other archive page, with a slider if it exists on the single post entry otherwise the featured image is displayed.
  3. The 3rd file archive.php contains code which enables you to replace the featured image with a slider if it exists on the single post entry otherwise no featured image is displayed.

Basically the code enables you to display a unique slider before the content on single posts and also display the slider in excerpts on archive pages.

The code also enables you to choose the featured image size and alignment.

Here’s the demo video which shows how it works :

Demo Video

Shows how to add the soliloquy slider id to a custom field named slider and display the slider before the content on single posts as well as replace the featured image on archive pages with the slider.

Single Post Installation

To add a slider on any single post, create a new slider and add the slider id to a custom field named slider as seen in the demo video :

Upload the file named single.php to your child themes root directory.

Archive Page Installation

To display the slider from the single post replacing the featured image on the archive page, upload the file named page_blog.php to your themes root directory. This will display the slider in replace of the featured image on the bog page archive. Rename the page_blog.php file using the WordPress Template Hierarchy to execute the code on specific archive page types like archive.php, author.php, blog, category.php, search.php, and tag.php archive page types.

Requires the installation of the Soliloquy slider.

Tested using the Genesis Sample child theme by StudioPress.

Register or login to access the download folder :

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.