Support

Account

Home Forums General Issues Text Slider?

Helping

Text Slider?

  • Hi,

    I have registered a custom post type and given it fields using ACF (Text, description, image, link fields).

    I have got it displaying how I like, but I now want to add them into a slider, rather than displaying one after another. I can find lots of resources on how to add image sliders using a gallery, bit little on text sliders.

                <div class="large-2 cell">
    
                <?php 
    
                $image = get_field('image');
    
                        // thumbnail
                $size = 'medium';
                $thumb = $image['sizes'][ $size ];
                $width = $image['sizes'][ $size . '-width' ];
                $height = $image['sizes'][ $size . '-height' ];
    
                if( !empty($image) ): ?>
    
                <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
    
                <?php endif; ?>
    
                </div>
    
                <div class="large-10 cell">
    
                <header class="article-header">
                    <h2><?php the_field('title'); ?></h2>
                    <?php the_field('description'); ?>
    
                        <?php 
    
                        $link = get_field('link_to_auction');
    
                        if( $link ): ?>
                            
                            <a class="button" href="<?php echo $link; ?>">Link to Auction</a>
    
                        <?php endif; ?>
                </header>
    
                </div>

    This is my code for one of them, any links to resources regarding this would be great. Thnaks..

  • What are you using to handle the sliding? Usually, you can just wrap all of the content that you want to be a slide into a single element (like a div) and the slider will handle the rest. Sometimes you have to specify what the element is, but that all depends on the slider that you want to use.

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

The topic ‘Text Slider?’ is closed to new replies.