Slider (Hide the image in post)

Hi! My second question is this: I understand that slider can only display images from categories. Is there a way to create a dummy post with a dummy category so that the picture can be displayed in the slider but not show that dummy category and dummy post on the blog to the public?

Also, is it possible to display slider on every page? I will be using it as a large picture header that is static.

Thank you!

Unfortunately, it is not possible to hide those posts with theme settings but most likely there is some plugin that can get this done.

To add slider on all pages it is much easier:
In functions.php file you should remove all wrapping code from slider CSS and JavaScript files to make it work on front page.

Reminding code will look like this:

wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/inc/css/flexslider.css' );

wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/inc/js/flexslider.min.js', array('jquery'), '20140222', true );

Now you will have to get rid of function that check if it is front page to display slider. Slightly edit this function in extras.php

if ( is_front_page() && of_get_option('sparkling_slider_checkbox') == 1 ) {

and leave it like this

if ( of_get_option('sparkling_slider_checkbox') == 1 ) {

Let me know if this works.

“it is not possible to hide those posts with theme settings but most likely there is some plugin that can get this done”

can you please tell me such a plugin…

I would like to have the slider work on all of my site’s pages. I’m not understanding the 1st part of the instructions you’ve mentioned to make it happen. I’m unsure what I’m to do in the functions.php file. What exactly needs removed from the functions.php file?

To add slider on all pages it is much easier: In functions.php file you should remove all wrapping code from slider CSS and JavaScript files to make it work on front page.

Reminding code will look like this:

wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/inc/css/flexslider.css' );

wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/inc/js/flexslider.min.js', array('jquery'), '20140222', true );

In extras.php, I’m to do the following, correct?

Edit the function in extras.php

if ( is_front_page() && of_get_option('sparkling_slider_checkbox') == 1 ) {

and leave it like this

if ( of_get_option('sparkling_slider_checkbox') == 1 ) {

Only edit the functions.php and extras.php files, correct?

Thanks again for the information & help!

Replace

  if( ( is_home() || is_front_page() ) && of_get_option('sparkling_slider_checkbox') == 1 ) {
		wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/inc/css/flexslider.css' );
  }

with

wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/inc/css/flexslider.css' );

and

	if( ( is_home() || is_front_page() ) && of_get_option('sparkling_slider_checkbox') == 1 ) {
		wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/inc/js/flexslider.min.js', array('jquery'), '20140222', true );
	}

with

wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/inc/js/flexslider.min.js', array('jquery'), '20140222', true );

OK, the slider works on all of the pages now, BUT I’ve come across a weird issue with featured images on Pages. This is very strange and no idea why it’s happening now after changing the slider coding to make the slider show up on all pages. A featured image I have set for a particular post that is featured in the slider NOW shows up on ALL PAGES! The post is http://mikeposnerhits.com/mike-posner-my-light-official-music-video/ which is titled Mike Posner – “My Light” (Official Music Video). That same featured image is now on top of every single page, for example in the navigation if you click on MIKE, MUSIC, EVENTS, LYRICS, VIDEOS, REQUEST, MPH, ONLINE, plus all the rest of the pages I have on my site. Every single PAGE has that particular featured image, ha ha ha. This is very strange. Any idea why this happened? Help me fix this please, I really do appreciate all of your help. :slight_smile:

I’m not sure if you read my previous post from yesterday yet, but I came across a new issue after making changes to the slider coding that I now need help with.

After changing the slider coding to make the slider show up on all posts & pages, a featured image that I didn’t set on Pages is showing up now. It’s a featured image I have set for a particular post, that I do have featured in the slider, which NOW shows up on ALL of my website PAGES! Why is this happening, and how do I stop/remove featured images from Pages? I have NO featured images set on any of my website’s Pages, but somehow all of my website’s Pages are picking up a featured image from a post. Visit my website http://mikeposnerhits.com and visit some of my Pages that are listed in the navigation (excluding Gallery), and you’ll see that every single Page has the same featured image at the top of every Page. I NEVER set a featured image for any of the Pages.

This is due to customizations but since several users have implemented it, I will release an update to fix this for everyone in case others run into the same issue.

Sounds great! Thank you so much, and thanks for replying. :slight_smile:

I’ve kept the slider coding as is, letting the slider show up on all pages and posts even though a random post image is showing up on ALL of my pages in the featured image area. I did try to upload and set a featured image to one of my pages to try and see if I could override the image that’s showing up, but it didn’t work. I’ll be looking out for the new update that will hopfully fix this issue.

Thank you again!

You can get rid of this image now by removing this line of code from page.php file.

<?php the_post_thumbnail( 'sparkling-featured', array( 'class' => 'single-featured' )); ?>

This is only part of solution that will be available via update but it will get the job done.

Thank you for the info on how to remove the images from my pages. It worked! I did update the theme beforehand, and replaced back all of my coding changes that I have saved in a file on my PC. :slight_smile:

Hello,

First at all, I would like to thank you for your amazing themes.

I am using sparkling for WordPress and the responsive design for the slider doesn’t work properly on the iPad.

Please, could you help me to resolve this problem? Please find attached a screenshot.

Thank you in advance.
Regards,
MG

Hi MG,

It’s old thread. To help keep support thread separates let’s resolve your issue on your following separate thread.

https://colorlibsupport.com/t/the-responsive-design-for-the-slider-doesnt-work-properly-on-the-ipad/

Thanks,
Movin