• Hi,

    Have had problems since the upgrade.

    The default image of an old bike cannot be changed and I now have the author, date and comments codes back under every post – that I had managed to disable.

    The main problem is that, even if I create new posts, they do not show in the image slider.

    Angry customer, unusuable website and I notice that the back ups I thought I had are not there !!.

    Please help.

    Many thanks
    Tracy

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have the same problem. I can not change the image of the slides. Even creating new posts with different images , the one who appears is a still image of an old bike.

    To change the slider image just try to change echo call in modality-image-sliders.php file because by default you have the static image to be shown slide1.jpg

    I am having the same issue. This is crazy ?? Can’t publish until that bike is gone.

    tpavlo- I see the echo call but I am not sure what to change it to so that it shows my featured image.

    I found a solution:

    I reverted modality-image-sliders.php back to the previous version and it is working.

    Go to Apperance – Editor – modality-image-sliders.php and replace all of the text with this: (PLEASE BACK UP YOUR image-sliders.php FIRST IN CASE YOU WANT TO GO BACK TO THE WAY IT WAS)

    <?php
    /**
    * Modality functions and definitions
    *
    * @package Modality
    */

    function modality_slider() {
    global $post;
    $modality_theme_options = modality_get_options( ‘modality_theme_options’ );
    $slider_cat = $modality_theme_options[‘image_slider_cat’];
    $num_of_slides = $modality_theme_options[‘slider_num’];
    $button_text = $modality_theme_options[‘caption_button_text’];

    $modality_slider_query = new WP_Query(
    array(
    ‘posts_per_page’ => $num_of_slides,
    ‘cat’ => $slider_cat
    )
    );?>
    <div class=”clear”></div>
    <div class=”banner”>

      <?php while ( $modality_slider_query->have_posts() ): $modality_slider_query->the_post(); ?>
      <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘single-post-thumbnail’ ); ?>
      <li style=”background: url(<?php echo esc_url($image[0]); ?>) 50% 0 no-repeat fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;”>
      <?php if ($modality_theme_options[‘captions_on’] == ‘1’) { ?>
      <div class=”inner”>
      “><h1><?php the_title(); ?></h1>
      <?php the_excerpt(); ?>
      </div>
      <?php if ($modality_theme_options[‘captions_button’] == ‘1’) { ?>
      ” class=”btn”><?php echo $button_text ?>
      <?php }; ?>
      <?php }; ?>

      <?php endwhile; wp_reset_query(); ?>

    </div>
    <div class=”clear”></div>

    <?php
    }

    function modality_localize_scripts(){
    wp_enqueue_script( ‘slides’, get_template_directory_uri() .’/js/slides.js’ , array( ‘jquery’ ), ”, true );
    $modality_theme_options = modality_get_options( ‘modality_theme_options’ );
    $animation_speed = $modality_theme_options[‘animation_speed’];
    $slideshow_speed = $modality_theme_options[‘slideshow_speed’];
    $datatoBePassed = array(
    ‘slideshowSpeed’ => $slideshow_speed,
    ‘animationSpeed’ => $animation_speed,
    );
    wp_localize_script( ‘slides’, ‘php_vars’, $datatoBePassed );
    }

    add_action( ‘wp_enqueue_scripts’, ‘modality_localize_scripts’ );

    hckyman- thank you for the reply. Something is off. I pasted your code and it does not show an image. Instead it all gray with a couple of symbols displayed:

    https://50.87.248.109/~messywar/temporarywarrior/

    Amaclean23- I think you need to set a featured image for that post. From your dashboard, go to edit the post and at the bottom right of the page, you should see a box to set your featured image. Add an image and it should then work.

    My slider was working perfect this morning but now slider 1 is not showing the image, it is gray. I added an extra slider and it shows fine, the problem is with slider 1. I tried to remove it but then slider 2 doesn’t show the image (just gray). This is only happening in Firefox. In IE the sliders are not aligned, they are showing part of the other slider.

    https://floorcarecrew.com/

    I made it work by replacing:
    (<?php echo get_template_directory_uri() ?>/images/assets/slide1.jpg)

    with:
    (<?php echo esc_url($image[0]); ?>)

    I have the same problem. But in another site using the same template, never happened. The php echo is ok, replaced the entire code and nothing…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Upgrade to 4.2.4 has left Image Slider with default image only’ is closed to new replies.