• Crashatorr

    (@crashatorr)


    Hi, I would like to know how to remove the sliding menu which is set by default to my front page. I’d like to make it gone and make it look like all the other pages. I found out I have to edit header.php file, but unfortunately I have very small understanding of PHP. I am using University theme. Thank you in advance for all tips.
    Probably something in here needs to be edited

    <?php if (is_front_page()) : ?>
    					 <?php
    						$args = array(
       							'posts_per_page' =>-1,
    							'post_type' => 'any',
    	  						'post__not_in' => get_option( 'sticky_posts' ),
          						'meta_query' => array(
             					array(
                					'key' => '_university-slider-checkbox',
                					'value' => 'yes'
             						)
          							)
       							);
    						$slider_posts = new WP_Query($args);
    						?>
    
    					<div id="slidecontainer">
    						<div class="camera_wrap" id="camera_wrap_1">
    							<?php if($slider_posts->have_posts()) : ?>
    							<?php while($slider_posts->have_posts()) : $slider_posts->the_post() ?>
    							<div data-thumb="<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'slidethumb' ); ?><?php echo $image[0]; ?>" data-src="<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'slideimage' ); ?><?php echo $image[0]; ?>" data-link="<?php if(get_post_meta($post->ID, 'slidelink', true)): ?>
    									<?php echo get_post_meta($post->ID, 'slidelink', true); ?>
            							<?php else : ?>
    									<?php the_permalink(); ?>
                                <?php endif; ?>">
    								<div class="fadeIn camera_effected">
    									<?php if(get_post_meta($post->ID, 'slidetitle', true)): ?>
    									<?php echo get_post_meta($post->ID, 'slidetitle', true); ?>
    									<?php else : ?>
    									<?php the_title(); ?>
    									<?php endif; ?>
    								</div>
    							</div>
    							<?php endwhile ?>
    							<?php wp_reset_postdata(); ?>
    							<?php endif ?>
    
    						</div>
    					</div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Viva Themes

    (@vivathemes)

    Hi,

    Do you mean remove the image slideshow? You can remove this code in ‘header.php’ file

    <?php
       				$args = array(
       							'posts_per_page' =>-1,
    							'post_type' => 'any',
    	  						'post__not_in' => get_option( 'sticky_posts' ),
          						'meta_query' => array(
             					array(
                					'key' => '_university-slider-checkbox',
                					'value' => 'yes'
             						)
          							)
       							);
      				$slider_posts = new WP_Query($args);
    			?>
    <div id="slidecontainer">
      <div class="camera_wrap" id="camera_wrap_1">
        <?php if($slider_posts->have_posts()) : ?>
        <?php while($slider_posts->have_posts()) : $slider_posts->the_post() ?>
        <div data-thumb="<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'slidethumb' ); ?><?php echo $image[0]; ?>" data-src="<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'slideimage' ); ?><?php echo $image[0]; ?>" data-link="<?php if(get_post_meta($post->ID, 'slidelink', true)): ?>
    									<?php echo get_post_meta($post->ID, 'slidelink', true); ?>
            							<?php else : ?>
    									<?php the_permalink(); ?>
                                        <?php endif; ?>">
          <div class="fadeIn camera_effected">
            <?php if(get_post_meta($post->ID, 'slidetitle', true)): ?>
            <?php echo get_post_meta($post->ID, 'slidetitle', true); ?>
            <?php else : ?>
            <?php the_title(); ?>
            <?php endif; ?>
          </div>
        </div>
        <?php endwhile ?>
        <?php wp_reset_postdata(); ?>
        <?php endif ?>
      </div>
    </div>

    also, to remove unnecessary scripts in ‘functions.php’ file remove this part

    if(is_front_page()){
    wp_enqueue_script( 'university-slidemobile-script', get_template_directory_uri() . '/js/jquery.mobile.customized.min.js', array( 'jquery' ), '', true );
    wp_enqueue_script( 'university-jquery-easing', get_template_directory_uri() . '/js/jquery.easing.1.3.js', array( 'jquery' ), '', true );
    wp_enqueue_script( 'university-camera-script', get_template_directory_uri() . '/js/camera.js', array( 'jquery' ), '', true );
    }

    Edy

    Thread Starter Crashatorr

    (@crashatorr)

    @edy
    Thank you,
    one more thing to ask, could you explain how would I put any pictures into the slideshow please?

    Theme Author Viva Themes

    (@vivathemes)

    In the post above I showed you how to remove the slideshow. Isn’t it what you asked for?

    To add images to the slideshow please refer to the readme.txt file located inside the theme.

    Edy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove the slider menu and replace it?’ is closed to new replies.