WordPress.org

Support

Support » Themes and Templates » Linking a page to Slider Picture without using Theme call to action button

Linking a page to Slider Picture without using Theme call to action button

  • Hi, thanks for the theme! It looks great.

    I was wondering if there is a way to link a slider image to a page without using the built-in slider button created from the slider settings. In other words, I would like to make the whole picture a link without having an overlay buttons or boxes.

    I am very new to coding and WordPress, so any help is greatly appreciated! Thanks!

Viewing 15 replies - 1 through 15 (of 23 total)
  • This is exactly what I would like to do! Other than that Customizr is the most awesome theme I have ever used. I really hope there is a way to do this!

    I would also like to know how it’s done 🙂
    Great theme btw!

    I really do love Customizr, but…

    I suggest WP Slider as a plug in. It seems to work about as well as the slider supplied with Customizr, but allows URLs to be embedded into the slides. 🙂

    I would also like to do this.

    I’ve developed a solution for this:

    Edit /wp-content/themes/customizr/inc/tc_voila_slider.php

    Go to line 141 and change this code from:

    <?php echo wp_get_attachment_image( $id, $img_size, array('class' => 'slide', 'alt' => $alt ) ); ?>

    to

    <a href="<?php echo get_permalink($button_link); ?>"><?php echo wp_get_attachment_image( $id, $img_size, array('class' => 'slide', 'alt' => $alt ) ); ?></a>

    Now edit /wp-content/themes/customizr/inc/css/YOURCSS.css

    And change:

    .btn {
      display: inline-block;

    to

    .btn {
      /*display: inline-block;*/

    BAM! You’re done! 😀 😀 😀

    Thank you so much! It is truly appreciated. I had one quick followup question, would it be possible to only make the slider pictures with specific hyperlinks active. On my page, the pictures without a specified link redirect to the blog archive page. Since this isn’t a heavily emphasized portion of the site, I’d rather those pictures not have active hyperlinks at all. Thanks again! I really appreciate your work.

    latechbcm.org

    Hi I want to do this as well, I am having trouble getting to the directories you provide. How do i navigate to these directories? Thank you so much.

    goodpetstuff.com/newsite

    Actually, I found it in a different directory within the Editor.
    Customizr: class-header-slider.php (parts/class-header-slider.php)

    Still cannot find the “YOURCSS.css” area to complete this solution.

    Sorry, it’s probably me but I cannot fix it with the suggested solution. Simply want to make the sliders “clickable” links WITHOUT the buttons.

    it worked! I realized I didn’t “update file”. And instead of finding the YOURCSS.css directory and changing the file, I simply added the CSS code to the “custom css” area in the CustomizIt! option.

    Hi guys,

    So I’ve been looking for this very solution but can’t seem to implement it on the current version of Customizr. I’ve checked class-header-slider.php but can’t seem to get the code to work for me in the right place.
    Any chance of a line reference for where I should be putting the code just to make sure I’m getting it right?

    Alternatively is there another method available?

    In 3.0.8 this would now be in class-header-slider.php

    But the code has all changed since then. Needs a php expert to correct it.

    Yes, I thought that might be the case.

    Any php experts out there on this forum so?

    Scott

    @olsonsp4c

    This works. Change it in parts/class-header-slider.php around line 204:

    //attachment image
    //                        $slide_to_display   =  wp_get_attachment_image( $id, $img_size, array( 'class' => 'slide' , 'alt' => $alt ) );
    // custom changes for clickable image
                            $button_perm        =  get_permalink($button_link);
                            $slide_img          =  wp_get_attachment_image( $id, $img_size, array('class' => 'slide', 'alt' => $alt ) );
                            $slide_to_display   =  '<a href="'.$button_perm.'">'.$slide_img.'</a>';

    maybe the author could consider adding this with and “if” statement that activates it if the option is selected in the settings page.

    hope this helps you guys.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Linking a page to Slider Picture without using Theme call to action button’ is closed to new replies.