Slideshow not working
-
Hello,
I am having trouble getting a slideshow to run on my site.I am using this shortcode (copied from the demo site):
[strong thumbnail excerpt more_post slideshow show_for=”4″ effect_for=”1″]
[client]
[field name=”client_name” class=”name”]
[/client]
[/strong]Here is the result on my site:
http://www.swiftwick.com/sw/test-4Any advice?
Thank you so much!
-
It looks like it’s set up in home.php. Here’s a snippet of code that looks relevant. Keep in mind that references to “testimonials” refer to the theme’s built-in testimonials function, which I am trying to replace with Strong. Also, I do have this set up as a child theme; so if we want to completely change this code in order to use your short code, that’s fine.
<?php if ( $i == 3 ) { ?>
<?php if ( get_option(‘mycuisine_use_area3’) != ‘on’ ) { ?>
<h3 class=”title”><?php esc_html_e(“Customer Testimonials”,’MyCuisine’); ?></h3>
<?php
$testimonials_args = array(
‘post_type’ => array(‘testimonial’),
‘posts_per_page’ => ‘1’,
‘orderby’ => ‘rand’
);
$testimonials_query = new WP_Query( $testimonials_args );
while ( $testimonials_query->have_posts() ) : $testimonials_query->the_post(); ?>
<div class=”testimonials-item”>
<div class=”testimonials-item-bottom”>
<div class=”testimonials-item-content”>
<?php
$thumb = ”;
$width = 56;
$height = 56;
$classtext = ‘item-image’;
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,’Testimonial’);
$thumb = $thumbnail[“thumb”];
?>
<?php if ( $thumb <> ” ) { ?>
<div class=”thumb”>
<?php print_thumbnail($thumb, $thumbnail[“use_timthumb”], $titletext, $width, $height, $classtext); ?>
<span class=”overlay”></span>
</div> <!– end .thumb –>
<?php } ?>
<p class=”author”><?php the_title(); ?></p>
<?php the_content(”); ?>
</div> <!– end .testimonials-item-content –>
</div> <!– end .testimonials-item-bottom –>
</div> <!– end .testimonials-item –>
<?php endwhile; wp_reset_postdata(); ?>
<?php } else { ?>
<?phpI don’t think that’s relevant as the View is loading testimonials properly except for starting the slideshow.
And you didn’t answer my question.
I don’t see a way to put your short code directly into that section unless it’s via the home.php module. There isn’t an actual page for the home page that I can edit; all of its options are set in the Elegant Themes control panel. I can over-ride the default behavior, which is specified in home.php, by choosing a page to insert into section 3 via the ePanel.
Check out this screen shot of the Elegant Themes ePanel; it shows that I’ve set section 3 as active and set it to the page where I’m using your short code for the Slideshow view I created.
http://screencast.com/t/wyZ4oFxD
So, since there isn’t an actual editable page for the Home page, where I might put a short code or a widget, I have to use the settings in ePanel to point to a separate page which gets embedded in the specified section. My only other option is to edit the home.php code; if that’s an option, then perhaps I could put the short code there?
Thanks for your replies; I really appreciate the assistance.
Thanks for the screenshot and explanation. I got my hands on the theme. Pretty but convoluted.
Let’s test this version of the plugin:
https://github.com/cdillon/strong-testimonials/tree/dev
Download it here:
https://github.com/cdillon/strong-testimonials/archive/dev.zipDelete the current version first. You won’t lose any settings or testimonials.
Please let me know how it works.
I would stay away from modifying home.php unless you want to learn PHP the hard way.
Bonus:
To remove the theme’s testimonials, add this to your child theme’s functions.php:/** * Remove Elegant Themes testimonial post type */ function deregister_elegant_testimonials() { global $wp_post_types; if ( isset( $wp_post_types[ 'testimonial' ] ) ) { unset( $wp_post_types[ 'testimonial' ] ); } } add_action( 'init', 'deregister_elegant_testimonials', 20 );Thanks for looking into this; I’ll try your suggestions later tonight.
Chris,
I just implemented your dev version, which worked perfectly. I also updated functions.php to get rid of the built-in testimonials and that worked great too. Thanks again for all of your help!
Thanks Mike. I will publish a proper update soon to replace that dev version.
A summary of this thread:
The original poster has not followed up but I suspect a wonky theme not doing things “the WordPress way.”
The second poster tried
do_shortcode()in a template file and that will not work. I have no plans to add that functionality. For theme experts, there are templates and template functions, and soon a single template function to add a testimonial view anywhere.The latest poster had a theme that found yet another way to store content. This will be handled in version 1.23.
If you are having problems with slideshows, pagination, or form validation, start here:
https://wordpress.org/support/topic/your-theme-must-call-wp_head-and-wp_footerIf you are using a drop-and-drop page builder, check the list in
admin > Testimonials > Guide > Page Buildersfor compatibility. If yours is not listed, feel free to recommend it. Adding support for a particular page builder is simple; it actually takes longer to deconstruct the page builder or theme, and I have to buy it 🙂As these three cases illustrate, every setup is different and every theme is different, and since the slideshow is not buggy, please start a new thread.
The topic ‘Slideshow not working’ is closed to new replies.