• Hi,

    I’m using the Content Slide plugin which automatically creates a link to the post it is displaying using the permalink. What I’d like to do is create the option to use a custom field in place of the permalink if a custom field value exists.

    The code in Content Slide looks like this currently:

    <a href="<?php the_permalink(); ?>" title="<?php the_title();?>" <?php echo $new_window;?>><?php the_post_thumbnail ( array($wpcs_settings['width'], $wpcs_settings['height']) ); ?>
            <?php if($wpcs_settings['show_excerpt'] == 'true') { ?>
                <span><h4><?php the_title(); ?></h4><?php wpcs_content_slider_limitpost($wpcs_settings['char_length'], "" ); ?></span>
            <?php } ?>
            </a>

    How do I add an if that says, if the custom field $link is not blank, use it instead of the permalink?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content slide permalink or custom field’ is closed to new replies.