WordPress.org

Forums

HMS Testimonials
[resolved] Testimonials not rotating in footer (7 posts)

  1. ejwaibel
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to use the hms_testimonials_rotating shortcode in a footer on the site I'm working with. It seems that the testimonials are all loaded (in a hidden div), but they do not rotate.

    The site is: http://www.glisteningpoolserviceaz.com/

    This is what I have in footer.php:
    <?php echo do_shortcode('[hms_testimonials_rotating seconds="10" order="testimonial_date" direction="DESC"]'); ?>

    https://wordpress.org/plugins/hms-testimonials/

  2. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    Can you show me your header.php template file? I don't see the javascript file being loaded. This will happen automatically assuming you have <?php wp_head(); ?> in your header.php.

  3. ejwaibel
    Member
    Posted 1 year ago #

    Be forwarned, I did not write this, I'm just troubleshooting ;)...

    <title><?php
    	global $page, $paged;
    	wp_title( '|', true, 'right' );
    		bloginfo( 'name' );
    		$site_description = get_bloginfo( 'description', 'display' );
    		if ( $site_description && ( is_home() || is_front_page() ) )
    			echo " | $site_description";
    		if ( $paged >= 2 || $page >= 2 )
    			echo ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) );
    	?>
    </title>
    <meta name="description" content="<?php if ( is_single() ) {
    	single_post_title('', true);
    	} else {
    	bloginfo('name'); echo " - "; bloginfo('description');
    	}
    ?>" />
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    
    <!-- The little things -->
    	<link rel="profile" href="http://gmpg.org/xfn/11" />
    	<link rel="icon" type="image/png" href="<?php echo bloginfo('template_directory'); ?>/assets/images/favicon.png" />
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    
    <!-- The little things -->
    
    <!-- Stylesheets -->
    	<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="all" />
    	<link rel="stylesheet" href="<?php echo bloginfo('template_directory'); ?>/bjqs.css">
    
    <!-- Stylesheets -->
    
    <!-- Load scripts quick smart -->
    	<script src="<?php echo bloginfo('template_directory'); ?>/assets/scripts/modernizr-2.0.6.js"></script>
    	<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    	<script src="<?php echo bloginfo('template_directory'); ?>/js/bjqs-1.3.min.js"></script>
    	<script src="<?php echo bloginfo('template_directory'); ?>/js/common.js"></script>
    
        <!--[if (lt IE 9) & (!IEMobile)]>
    		<script src="<?php echo bloginfo('template_directory'); ?>/assets/scripts/respond.js"></script>
    		<script src="<?php echo bloginfo('template_directory'); ?>/assets/scripts/selectivizr-min.js"></script>
    	<![endif]-->
    <!-- Load scripts quick smart -->
    
    <style type="text/css">
    	ul#menu-main, li.bjqs-prev a, li.bjqs-next a{
    		background-color: <?php echo ot_get_option( 'main_colour' ) ?>;
    	}
    	#content .blog ul li a:hover, p.entry-meta, .entry-summary h2 a:hover{
    		color: <?php echo ot_get_option( 'main_colour' ) ?>;
    	}
    	#content .work ul li h3, #content .work ul li h2{
    		border-color: <?php echo ot_get_option( 'main_colour' ) ?>;
    
    	}
    	::selection {background: <?php echo ot_get_option( 'main_colour' ) ?>; color: #fff}
    	::-moz-selection {background:<?php echo ot_get_option( 'main_colour' ) ?>; color: #fff}
    
    	::selection {background: <?php echo ot_get_option( 'main_colour' ) ?>; color: #fff}
    	.sub-navigation li a:hover, ul li.current_page_item {
    		background: <?php echo ot_get_option( 'main_colour' ) ?>; color: #fff
    	}
    	li.comment{
    		border-bottom: 3px solid <?php echo ot_get_option( 'main_colour' ) ?>;
    	}
    
    </style>
    
    <?php wp_deregister_script('jquery');wp_head(); ?>
    </head>
  4. ejwaibel
    Member
    Posted 1 year ago #

    This little gem right here <?php wp_deregister_script('jquery');wp_head(); ?> is causing the problem. Since jquery is being deregistered, the testimonial plugin script never loads. What's the best way to fix this?

  5. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah I was looking at that. If you remove wp_deregister_script('jquery'); does everything still work?

  6. ejwaibel
    Member
    Posted 1 year ago #

    Ok, turns out there was a chunk of javascript that was in the home.php file, just moved that into the header and removed wp_deregister_script('jquery'); and everything is working!

  7. Jeff K
    Member
    Plugin Author

    Posted 1 year ago #

    Cool. I am glad you were able to get it working. Unfortunately every theme and website is different in how it has to work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • HMS Testimonials
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic