Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • ArtisticAdam

    (@artisticadam)

    alternatively you can include default values in the shortcode.php lines 8-12 like this.

    function swpt_testimonial_shortcode($atts){
    	extract(shortcode_atts(array(
       		'testimonials' => '1',
       		'order' => 'asc',
          'orderby' => 'id',
          'effects' => 'fade',
          'time' => '5000',
          ), $atts));

    this way you can use the shortcode with any combination of the available attributes and it will display correctly.

    ArtisticAdam

    (@artisticadam)

    John, I was having the same issue today with the shortcodes..Seems if you use order you must also use orderby. The example shortcode in the help section is wrong, try this.

    [swp-testimonial testimonials="1" order="asc" orderby="id" effects="scrollRight" time="5000"]

    Interesting, here is what I changed in sg-jqvs-widget-plugin.php. You will notice I also changed it from a list to paragraph formatted but this should not affect the outcome.

    <div class="scrollingtext">
    
                    <?php
                        global $post;
                        $tmp_post = $post;
                        $args = array(
                            'numberposts'     => $mycount,
                            'category'        => $mycategory,
                            'orderby'         => 'post_title',
                            'order'           => 'ASC',
                            'post_type'       => $myposttype, /*'post',*/
                            'post_status'     => 'publish',
                            'suppress_filters' => false
                            );
                        $posts_array = get_posts( $args );
                        foreach( $posts_array as $post ) : setup_postdata($post);
                    ?>
    				<!--<li>-->
    
                        <?php if ( $myshowtitle == 'true' ) { ?>
                            <p class="sgjvs_widget_title">
                                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                            </p>
                        <?php } ?>
                        <?php if ( $myshowdate == 'true' ) { ?>
                            <p class="sgjvs_widget_date">
                                <?php
                                    $pfx_date = get_the_date( $myshowdateformat );
                                    echo $pfx_date;
                                ?>
                            </p>
                        <?php } ?>
                        <?php if ( $myincludecontent == 'content' ) { ?>
                            <p class="sgjvs_widget_content">
                                <?php
                                    $mysgjvscontent = get_the_content();
                                    echo $mysgjvscontent;
                                ?>
                            </p>
                        <?php } elseif ( $myincludecontent == 'excerpt' ) { ?>
                            <p class="sgjvs_widget_excerpt">
                                <?php
                                    $mysgjvsexcerpt = get_the_excerpt();
                                    echo $mysgjvsexcerpt;
                                ?>
                            </p>
                        <?php } ?>
    
    			<hr>
                    <?php endforeach; ?>
                    <?php $post = $tmp_post; ?>
    
            </div> <!-- end of scrolling text -->

    Not infront of the code atm but that is exactly what i did. What does your source code look like for that section? Do you see the HR added in the page code?

    I just made this alteration myself. A quick hack solution would be to edit sg-jqvs-widget-plugin.php file. Around line 344 look for the following

    <?php endforeach; ?>
    <?php $post = $tmp_post; ?>

    and add you division before the endforeach like so

    <hr>
    <?php endforeach; ?>
    <?php $post = $tmp_post; ?>

    Now i’m just looking to remove the empty space between scrolling loops. also when set to scroll from bottom to top there is a gap as well. Very noticeable if you have it displaying full post content.

Viewing 5 replies - 1 through 5 (of 5 total)