Viewing 15 replies - 1 through 15 (of 22 total)
  • I was wondering the same thing. You have to make the front page your blog posts. Details here:
    https://vpthemes.com/how-to-setup-image-slider-on-home-page/

    Theme Author vpthemes

    (@vpthemes)

    I created video tutorial for instructions on image slider setup. Please use following link: https://vpthemes.com/how-to-setup-image-slider-on-the-home-page-of-modality-theme/

    Hi, I love the theme! The best I came across so far.

    Slider does work.
    BUT
    Now I have all those “Slider Posts” that I don′t want in my page actually.
    Once I publish them so the post pic is in the slider, I have the “Slider post appearing in my website!

    How can I avoid the posts for the slider appearing in the page?

    Thank you!
    P.S. i tried hiding the posts but then I hide the pics too.

    Theme Author vpthemes

    (@vpthemes)

    To hide slider posts on the home page – go to WordPress dashboard -> Appearance -> Customize -> Modality Theme Options -> Theme Home Page Settings and uncheck “Display Blog Posts”.

    Hello –
    Very cool theme!!!

    I uploaded the Modality 24 hours ago and I cannot figure out why the homepage slider will not upload my featured post images.

    I’ve set my homepage to “Recent Post”. I’ve created “Slideshow” category. I’ve added 2 new posts with the following setting (format = image / category = slideshow / featured image added).

    In Modality theme options, the “Theme Image Slider” is set to category = slideshow.

    The slider works, however, my images do not appear. I only see the demo image of the vintage motorcycle.

    Have a missed an important step?
    Please advise.

    Thanks in advance.
    Mo.

    I am having the same issue. No matter what I do- it’s the bike image.

    I am also wondering if homepage sections can be re-ordered.

    Me too! Can’t set slider image, all motorcycle!

    I am having the exact same issue. I’ve tried everything to get rid of the motorcycle picture. If I delete the posts, the image goes away. However, when I post again and include my featured image, the darn motorcycle comes back. Please help.

    This does the trick for me in editor modality-image-sliders.php, solves the scaling as well as the very annoying motorcycle “from hell”

    <?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">
    	<ul>
    	<?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;background-size:cover; -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">
    				<a class="post-title" href="<?php the_permalink() ?>"><h1><?php the_title(); ?></h1></a>
    				<?php the_excerpt(); ?>
    			</div>
    			<?php if ($modality_theme_options['captions_button'] == '1') { ?>
    				<a href="<?php the_permalink() ?>" class="btn"><?php echo $button_text ?></a>
    			<?php }; ?>
    		<?php }; ?>
    		</li>
    	<?php endwhile; wp_reset_query(); ?>
    	</ul>
    </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' );

    “from hell” hahahha. Amen! It did get rid of it for me, thank you so much!

    So I have two issues left with this theme- I’m wondering if anyone can help:

    I can’t get a featured image to load on any post. Nothing happens.

    Secondly, in modality customizer, I see a place where I can edit “content boxes section” but that section doesn’t actually appear anywhere :/

    Dear Dielange,

    I replaced the entire code in the modality-image-sliders.php and it did not work. I lost some of the menu items and I got the message below. (See the bottom of the code for the error message.)

    THanks,

    Mark

    <?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;background-size:cover; -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’ );
    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3pnexwpnas07_data03/42/2771042/html/wp-content/themes/modality/functions/modality-image-sliders.php:57) in /home/content/p3pnexwpnas07_data03/42/2771042/html/wp-includes/pluggable.php on line 1207

    please slider image not scaling.

    hello please i really need help, my post not showing, only the title LATEST NEWS shows there.

    Thanks alot dielange;

    i got the slider. thanks buddy, you helped me.
    love u man

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘how to add at home page slider?’ is closed to new replies.