• Resolved spiretop

    (@spiretop)


    You have created the perfect plug-in for my the website I’m building except for 2 minor features I’m hoping you can add:

    1) Hyperlink the h3 and p tags in the slide. It seems to me it’s more intuitive to click the text than the slide. You can can leave the link on the slide, or not, I’m not sure it makes a big difference.

    2) Add Support for Bootstrap Buttons. Ideally, it would be an optional 3rd field that would appear below the h3 and p tags. It would give people a clear call to action on the slide. You can see what I’m talking about on the (non WP-enabled) test site I built here on the 2nd & 3rd slides: https://redeemerbrady.com/test/

    I could fork your plug-in in my site and add these features myself, but I figured you could do it better and others would benefit. If I could only have one of these features, it would be the 2nd one.

    Thanks again for the great plug-in and considering these features.

    https://www.ads-software.com/plugins/conveyor/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Watson

    (@mwtsn)

    Hi spiretop,

    The plugin is designed to give a basic bootstrap implementation, but is designed for developers, so I will not be adding additional UI features unfortunately. However you can achieve these features by using one of the query arguments provided by the plugin and building these features into your own loop.

    My suggestion is that you take a look at the FAQ here: https://www.ads-software.com/plugins/conveyor/faq/ in particular the section titled: What does the conveyor_query_arguements() function do?

    You will then be able to loop through several posts using the code:

    $posts = get_posts( conveyor_query_arguements( $args ) );

    You can then edit the following markup to get your desired result:

    if( is_array( $posts ) && count( $posts ) > 0 )
    	{
    		?>
    			<div id="<?php echo $r['id']; ?>" class="carousel slide" data-ride="carousel">
    
    				<?php
    
    					if( $r['render_indicators'] )
    					{
    						?>
    						<!-- Indicators -->
    						<ol class="carousel-indicators">
    							<?php
    								for ($i = 0; $i < count( $posts ); $i++)
    								{
    									?>
    										<li data-target="#<?php echo $r['id']; ?>" data-slide-to="<?php echo $i; ?>"<?php echo ( $i == 0 ) ? ' class="active"' : '';?>></li>
    									<?php
    								}
    							?>
    						</ol>
    						<?php
    					}
    				?>
    
    				<!-- Wrapper for slides -->
    				<div class="carousel-inner">
    
    					<?php
    
    						$i = 0;
    
    						foreach( $posts as $slide )
    						{
    							$conveyor_link_value 		= get_post_meta( $slide->ID, '_conveyor_link', true );
    							$conveyor_open_new_window 	= get_post_meta( $slide->ID, '_conveyor_open_new_window', true );
    							?>
    
    								<div class="item<?php echo ( $i == 0 ) ? ' active' : '';?>">
    									<?php
    
    										if( $r['images_as_links'] && !empty( $conveyor_link_value  ) )
    										{
    											?>
    												<a href="<?php echo $conveyor_link_value; ?>"<?php echo ( $conveyor_open_new_window == true ) ? ' target="_blank"' : ''; ?>><?php echo get_the_post_thumbnail( $slide->ID, 'full' ); ?></a>
    											<?php
    										}
    										else
    										{
    											echo get_the_post_thumbnail( $slide->ID, $r['image_size'] );
    										}
    
    										if( $r['render_captions'] && !empty( $slide->post_excerpt ) )
    										{
    											?>
    												<div class="carousel-caption">
    													<h3><?php echo $slide->post_title; ?></h3>
    													<p><?php echo $slide->post_excerpt; ?></p>
    												</div>
    											<?php
    										}
    									?>
    								</div>
    
    							<?php
    							$i++;
    						}
    
    					?>
    
    				</div>
    
    				<?php
    				if( $r['render_controls'] )
    				{
    					?>
    					<!-- Controls -->
    					<a class="left carousel-control" href="#<?php echo $r['id']; ?>" data-slide="prev">
    						<span class="glyphicon glyphicon-chevron-left"></span>
    					</a>
    					<a class="right carousel-control" href="#<?php echo $r['id']; ?>" data-slide="next">
    						<span class="glyphicon glyphicon-chevron-right"></span>
    					</a>
    					<?php
    				}
    				?>
    
    			</div>
    		<?php
    	}
    Thread Starter spiretop

    (@spiretop)

    What file is that code in that I would change?

    Plugin Author Matt Watson

    (@mwtsn)

    You would add it to your template, wherever you call the plugin now, write the above as a block of PHP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Request: Title Links and Buttons’ is closed to new replies.