Set link for slider instead of call-to-action button

Home Support Themes Forum Set link for slider instead of call-to-action button

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2003
    Anonymous
    Inactive

    Hi,

    I’m using the Awesomeone Pro theme and would like to remove the “read more” buttons on the slides and link the whole slider-image instead.
    Can you please provide a solution?

    Thanks,
    Stephanie

    #2010
    FlyThemes
    Keymaster

    Hi

    Yes we can do it for this need to do minor changes in theme files kindly send us your site url and the login details to support@flythemes.net so we can do it asap.

    Thank You

    #2041
    Anonymous
    Inactive

    Hello

    since it’s a company’s website I’d rather not give away the login details. Could you email me a short how-to instead?

    Thank you

    #2042
    FlyThemes
    Keymaster

    Hi

    Open header.php file and go to line no.78 where you can see the img tag and then you need to go to line no 93 there you can see anchor tag for slider link copy that entire anchor tag and paste it before img tag and close the anchor tag after img tag
    for example:

    <a class="read-more" href="<?php echo of_get_option('slideurl'.$sln,true); ?>">
        <img src="<?php echo esc_url($sv['image_src']); ?>" alt="<?php echo esc_attr($sv['image_title']); ?>" title="<?php if ( ($sv['image_title']!='') && ($sv['image_desc']!='')) { echo '#slidecaption'.$n ; } ?>"/>
    </a>

    While doing these changes make sure you should close all the tags properly otherwise this will gives you an error.

    Thank You

    • This reply was modified 8 years, 3 months ago by FlyThemes.
    • This reply was modified 8 years, 3 months ago by FlyThemes.
    • This reply was modified 8 years, 3 months ago by FlyThemes.
    #2049
    Anonymous
    Inactive

    Hello

    thanks for your fast answer, this does link the image now but it doesn’t lead to the correct address (the one that is set at Theme Options > Homepage Slider > Slide URL) but to http://www.whatever.com/1
    Even if it would I still miss the necessary change to then remove the call-to-action button, I did not mention that earlier though, maybe you can also provide this for me?

    Here my adapted code snippet:

    foreach( $slAr as $sv ){
       $n++; ?>
    	<a class="read-more" href="<?php echo of_get_option('slideurl'.$sln,true); ?>">
    		<img src="<?php echo esc_url($sv['image_src']); ?>" alt="<?php echo esc_attr($sv['image_title']);?>" title="<?php if ( ($sv['image_title']!='') && ($sv['image_desc']!='')) { echo '#slidecaption'.$n ; } ?>"/>
    	</a>
    <?php
    $slideno[] = $n;
    }
    #2079
    FlyThemes
    Keymaster

    Hi

    In the anchor tag href kindly change the $sln to $sv.

    Thank You

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.