WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Theme: Unique Theme Responsive] Disable click on slider (5 posts)

  1. kris_IV
    Member
    Posted 1 year ago #

    My theme Unique Theme Responsive (hire is a demo) have one slider.
    I want use it only to graphic and I want disable option to click on it (every one graphic have link and it open a single page).
    How can I get this results?

  2. kris_IV
    Member
    Posted 1 year ago #

    Part of index.php file:

    <?php get_header(); ?>
    
            <?php if(get_option($shortname.'_disable_slideshow','') != "Yes") { ?>
    
            <div id="slider_container">
    
                <div id="slideshow">
                  <?php
                  $slider_arr = array();
                  $args = array(
                               //'category_name' => 'blog',
                               'post_type' => 'post',
                               'meta_key' => 'ex_show_in_slideshow',
                               'meta_value' => 'Yes',
                               'posts_per_page' => 30
                               //'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
                               );
                  query_posts($args);
                  $y = 0;
                  while (have_posts()) : the_post(); ?>
    
                  <?php if($y == 0) { ?>
                    <a href="<?php the_permalink(); ?>" class="active">
                  <?php } else { ?>
                    <a href="<?php the_permalink(); ?>">
                  <?php } ?>
    
                  <?php the_post_thumbnail('featured-slideshow',array('alt' => '', 'class' => 'slide_img', 'title' => '')); ?></a>
    
                  <?php array_push($slider_arr,get_the_ID()); ?>
                  <?php $y++; ?>
                  <?php endwhile; ?>
                  <?php wp_reset_query(); ?>
                </div><!--//slideshow-->
    
                <a href="javascript:void(0)" onclick="slideSwitch_prev()" style="display: block;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slide-prev.png" class="slide_prev" /></a>
                <a href="javascript:void(0)" onclick="slideSwitch()" style="display: block;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/slide-next.png" class="slide_next" /></a>
            </div><!--//slider_container-->
  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    Why do you want to disable click on the slider?

  4. kris_IV
    Member
    Posted 1 year ago #

    Look hire: http://my-motivator.pl/

    I have one slider with 4 picture. I want do it like hire: http://heros.besaba.com/

    It means that I have picture but this picture doesn't have hyperlink.

    I have one idea - I want cover this area with transparent picture with higher z-index. This element have name: przykrywka.jpg but I can't manage with it good. Actually this element przykrywka.jpg (now is blue) is located hire: http://my-motivator.pl/przykrywka/przykrywka.jpg

  5. kris_IV
    Member
    Posted 1 year ago #

    OK- I solve this problem :) In index PHP i add:
    <a href="javascript:void(0)" onclick="none" style="display: block;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/przykrywka.png" class="slide_cover" /></a>

    And in CSS I add:
    #slider_container img.slide_cover { position: absolute; top: 0px; left: 0px; z-index: 998; width: 824px !important; height: 400px !important; display: block; }

    Now is OK:)

Topic Closed

This topic has been closed to new replies.

About this Topic