• Resolved suecarroll

    (@suecarroll)


    I want to remove the links on the featured slider in clean retina.

    This is my website http://www.christopher-dyson.co.uk

    I have a child theme and I have attempted to do this in the functions.php file by copying the relevant part of the header-extensions file and removing this;

    $cleanretina_featured_post_slider .= '<figure><a href="' . get_permalink() . '" title="'.the_title('','',false).'">';
    
    '</a></figure>'

    However, I got an error message and I ended up having to delete the functions.php file as the website broke. I am not sure if I was nearly there or on the completely wrong track

    Can anyone help?
    Thanks
    Sue

    ps. This is my first website and I am not a coder. I have tried asking this on clean retina support but no answer.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Sorry, but this forum doesn’t support commercial themes; http://codex.wordpress.org/Forum_Welcome#Commercial_Products

    You can try contacting the theme developer for help.

    You may also want to look at this:
    http://codex.wordpress.org/Function_Reference/get_the_title

    At a glance, I think you may be able to fix your problem by using get_the_title() rather than get_permalink().

    Thread Starter suecarroll

    (@suecarroll)

    Thanks for answering.

    Clean retina is a free theme (unlike clean retina pro). Unless I’m mistaken and you’re saying that this forum doesn’t support commercial websites (though I have been helped here before).

    I have contacted the clean retina (free) support but have not got an answer. There’s not much traffic there to be honest

    If it’s still ok I would appreciate your input as to what exactly to do?

    Thread Starter suecarroll

    (@suecarroll)

    Hopefully my question hasn’t now been dismissed by others as a question re a commercial theme.

    Post your question on the theme’s support forum here: http://wordpress.org/support/theme/clean-retina

    I’m not familiar with how your theme implements the slider feature so I won’t be able to help out much here on out – but hopefully the theme developer can help answer your question.

    Thread Starter suecarroll

    (@suecarroll)

    Thanks for answering anyway bemdesign. I have posted on that forum before and their own website forum but got no answer.

    My mistake, Sue, I misread. As noted above, the theme’s support forum is probably a better bet. You might want to try taking out the link (a href) code syntax in the snippet you pasted and instead use the get_the_title() function. Unfortunately I don’t have this theme installed so I can’t test that suggestion for you.

    One possible low-end “solution” would be to just use the hash tag (#) for the links. Not ideal, mind you, but it would prevent the links from going anywhere.

    Thread Starter suecarroll

    (@suecarroll)

    How would I do that? I mean do I put it in the functions file in my child theme and, if so, where exactly? Why not ideal?
    Sorry for all the questions, I really want to learn but know very little at the moment

    Again, I don’t know how your theme creates the slider – but I assume it may be via a custom post type in the theme’s functions.php file. If there’s a backend interface for organizing your slider (add slides, etc.) I assume there would be a field for selecting the URL you want the slide, when clicked, to go to. Put the hash tag (#) there.

    Again, not knowing your particular theme and how it works means I can only explain ideas in general terms and you’ll need to look into the code and figure out the best way of implementing them.

    An even better solution (IMO) would be to add some jQuery function in your footer (make sure to use the jQuery no-conflict style of coding and to use WordPress’ included jQuery library) to find the slider and basically remove the href attribute from all the slides inside it. Then no need to worry about hash tags. To do this, make a copy of the footer.php theme template file to use in your child theme and then in the bottom, just before the closing </body> tag, add this:

    <script type="text/javascript">
    jQuery(document).ready(function($){
    /*Replace .slider below with the id (#) or class (.) of the slider we want to affect with whatever html tags that follow to get down to the links*/
    $('.slider li a').removeAttr('href');
    });

    So jQuery looks for anything with the class of “slider” followed by a
    <li> (list-item) tag followed by an <a>(anchor) tag. It then finds the ‘href’ attribute of the anchor tags and removes it – thus removing the hyperlink.

    Anyway, this is another possible solution.

    [Moderator Note: Please post markup between backticks or use the code button.]

    Thread Starter suecarroll

    (@suecarroll)

    Theme horse eventually answered my post.

    I was on the right track above but had to cut a bit more code

    (Specifically just in case anyone needs to know <a href="' . get_permalink() . '" title="'.the_title('','',false).'"> and </a> a few lines below.)

    The links have now gone.

    Thank you so much bemdesign for taking the time to answer my post. This is such a wonderful community

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘removing link on featured slider’ is closed to new replies.