Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2871

    Hi,

    I would like my client to be able to change the home slider themselves to exhibit particular pages and the easiest way (I think) is to create extra categories for just the slider where they can update text and images.

    Question is, however, how to override (kill or replace) slides’ links to those categories and add custom urls.

    Reason being is that I want to advertise particular pages and categories other than those from where images and descriptions are grabbed.

    If there’s an easier way to, say, grab descriptions (can be just a one line of text, no need to be a header and an excerpt) and associated images from a designated page, cool too (how to make it show pages rather than categories you answered in another thread). Still need to be able to add custom urls though.

    I’m mainly concerned about messing up associated codes so would like to avoid replacing current slider with a separate wordpress plugin.

    Thank you heaps!

    #39609

    Hey,

    open up index.php and search for following code:

    <div class="featured featured<?php echo $loopcount; ?>">
    <a href="<?php the_permalink(); ?>">

    Replace it with:

    <div class="featured featured<?php echo $loopcount; ?>">
    <a href="<?php get_post_meta($post->ID, 'url', true); ?>">

    Then you must set post meta fields in all your portfolio posts. Call the fields “url” and type in the websites’ adresses as values.

    #39610

    awesome, thank you!

    #39611

    Glad that I could help you :)

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How to force different links on home slider’ is closed to new replies.