Slider Images Do Not Want to Show as posts

Hi rajeshchugh,
I have updated my site to look like yours - so beautiful! Please allow me to use yours pictures and contents to test for this theme.
One problem that I have is when I view my site from a mobile it displays in mobile style and has an option to view full site at the bottom.
http://quyencuc-001-site6.htempurl.com/
How can I set it up like yours - just go direct to mobile style?
Thanks,
Koala

Hi movin,
I just copied and pasted the code in function.php of child theme after that there is another short code for the same. Applied both but error. Kindly suggest.

Hi koala,
I am a bit confused about your url and what you want to do exactly. Better if you use your own content. Thn i can assist better.

@rajeshchugh

I just copied and pasted the code in function.php of child theme after that there is another short code for the same. Applied both but error. Kindly suggest.

Which shortcode are you talking about and what error are you getting?

You should copy the code of function sparkling_featured_slider from the shared topic in to your child theme functions.php file.

Hi Movin,

THIS SHORTCODE. please tell how to put this and where. I am totally confused now. Kindly review.

/**
 * Featured image slider, displayed on front page for static page and blog
 */
function sparkling_featured_slider() {
  if ( is_front_page() && of_get_option( 'sparkling_slider_checkbox' ) == 1 ) {
    echo '<div class="flexslider">';
      echo '<ul class="slides">';

        $count = of_get_option( 'sparkling_slide_number' );
        $slidecat =of_get_option( 'sparkling_slide_categories' );

        $query = new WP_Query( array( 'cat' =>$slidecat,'posts_per_page' =>$count ) );
        if ($query->have_posts()) :
          while ($query->have_posts()) : $query->the_post();

          echo '<li><a href="#">';
            if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :
              echo get_the_post_thumbnail();
            endif;

              echo '<div class="flex-caption">';
                  if ( get_the_title() != '' ) echo '<h2 class="entry-title">'. get_the_title().'</h2>';
                  if ( get_the_excerpt() != '' ) echo '<div class="excerpt">' . get_the_excerpt() .'</div>';
              echo '</div>';

              endwhile;
            endif;

          echo '</a></li>';
      echo '</ul>';
    echo ' </div>';
  }
}

@rajeshchugh

In WordPress Shortcode is a different term please see here Shortcode « WordPress Codex

I think you are referring SHORTCODE as snippet of code here.

Please copy the code of function sparkling_featured_slider from the shared topic and paste it in to your child theme functions.php file replacing your existing snippet of code that you shared above.

After doing this just create a custom field in the slider post in the admin area having name slider_link and add the URL as value in it where you want to redirect the slider post link.

Hi Movin,
Thanks but didnt got this

After doing this just create a custom field in the slider post in the admin area having name slider_link and add the URL as value in it where you want to redirect the slider post link.

I already linked the custom field words to the following page in my previous reply where it is explained in detail how to create custom field.

https://codex.wordpress.org/Custom_Fields#Usage

Hi movin
Thanks for your continuous support.
I got stuck here. Better if i will provide you user name and password, you can do the same.

Regards
Rajesh

Ok then just share me the credentials privately by checking the option “Set as private reply” when replying here so that i can do it on your site?

Hi movin
the login details are:

username - rajeshchugh
password - colorlib

url - http://www.petalsayurveda.com/wp-admin

Issue - “all slider image click must be forwarded back to the home back”

Thank you for sharing the site details.

O achieved it by editing the functions.php file of your child theme and adding slider_link custom field for first post of slider as shown in the attached screenshot.

Please create custom field for other slider posts.

Hi,
Thanks for the solution.
But now i am unable to see the posts, converted as slider images. Need to edit them. or to add new slider image.

You are most welcome here :slight_smile:

But now i am unable to see the posts, converted as slider images. Need to edit them. or to add new slider image.

Not sure what you meant by this so please describe it a bit more in detail.