Slider Text & Action Button

Support Area Forums Bottega Slider Text & Action Button

Viewing 4 posts - 1 through 4 (of 4 total)
URL to the page in question: http://ea7.1a3.myftpupload.com/
  • Author
    Posts
  • #29187
    Nicholas Minnich
    Participant

    Hi Bill,

    I think I got spoiled by your newer templates with the sliders with text overlay and action button!

    Is it feasible to replicate Elite’s slideshow without tons of development time?

    I would even be happy with a custom field to add html on top of each slide…

    Thanks!!!

    #29193
    Bill Robbins
    Moderator

    Good Morning Nicholas,

    I can appreciate that. Just about anything can be done if you’d like to make the changes. The slides are created in the page-home.php file in this section:

    
    <li id="slide-<?php the_ID(); ?>">
    	<?php if(get_post_meta($post->ID, "slide_video", $single = true) != ""){ ?>
    				
    		<div class="fit-video">
    			<?php echo get_post_meta($post->ID, "slide_video", TRUE); ?>
    		</div>
    				
    	<?php } else { ?>
    							
    		<a href="<?php echo get_post_meta($post->ID, "slideurl", TRUE); ?>"><?php the_post_thumbnail('header-image'); ?></a>
    					
    	<?php } ?>
    				
    </li>
    

    Right above this:

    
    <a href="<?php echo get_post_meta($post->ID, "slideurl", TRUE); ?>"><?php the_post_thumbnail('header-image'); ?></a>
    

    you could add in custom fields. A new field might look like this:

    
    <?php if ( get_post_meta($post->ID, "slide_title", $single = true ) != "" ) { ?>
    	<h2 class="slide-title"><?php echo get_post_meta($post->ID, "slide_title", TRUE); ?></h2>
    <?php } ?>
    

    That would add in a new field with the key of slide_title to the front end of the site. For the backend you’d need to edit the bottega-meta-boxes.php file (it’s in the includes/custom-meta-boxes folder). This section is where the meta boxes are added to the slides:

    
    	$meta_boxes[] = array(
    		'id'         => 'slide_metabox',
    		'title'      => 'Slide Options',
    		'pages'      => array( 'slide', ), // Post type
    		'context'    => 'normal',
    		'priority'   => 'high',
    		'show_names' => true, // Show field names on the left
    		'fields'     => array(
    			array(
    				'name' => __( 'Optional Link', 'organizedthemes' ),
    				'desc' => __( 'Works with an image slide, not a video slide.', 'organizedthemes' ),
    				'id'   => 'slideurl',
    				'type' => 'text',
    			),
    			array(
    				'name' => __( 'Video Code', 'organizedthemes' ),
    				'desc' => __( 'To make this slide a video, paste your embed code here.  Video slides do not support links or captions.  For best results with videos, set the slideshow to NOT Automatically play', 'organizedthemes' ),
    				'id'   => 'slide_video',
    				'type' => 'textarea_code',
    			),
    		),
    	);
    

    You could duplicate:

    
    array(
    				'name' => __( 'Optional Link', 'organizedthemes' ),
    				'desc' => __( 'Works with an image slide, not a video slide.', 'organizedthemes' ),
    				'id'   => 'slideurl',
    				'type' => 'text',
    			),
    

    and change the id to slide_title from slideurl and change the name and description to describe what you’re adding.

    That should let you add in a slide title. You can repeat that for as many other fields as you need to add in there.

    If you run into any questions or trouble, let me know.

    Have a great week,
    Bill

    #29221
    Nicholas Minnich
    Participant

    It worked! Thanks for the outstanding service!

    #29225
    Bill Robbins
    Moderator

    Fantastic…happy to help out 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Slider Text & Action Button’ is closed to new replies.