ratmalwer
Forum Replies Created
-
Forum: Plugins
In reply to: [Ultimate Responsive Image Slider] plugin duplicates postsHi Frank
hope you are well!
I found a workaround, now I cannot reproduce the issue. But I had a new issue witch could be a reason for that or related to it:
calling the slider the post-id is changing. Look at hte folloing code:
$args = array( 'post_type' => 'ris_gallery', 'orderby' => 'date', 'order' => 'DESC', ); $myposts = new WP_Query( $args ); if ($myposts->have_posts()) : while ( $myposts->have_posts() ) : $myposts->the_post(); echo 'ID before='.get_the_ID().'<br>'; echo '<h3>' . get_the_title() .'</h3>'; echo do_shortcode('[URIS id='.get_the_ID().']'); echo 'ID after is not the same as before='.get_the_ID().'<br><br>'; endwhile; // Restore original Query & Post Data wp_reset_query(); wp_reset_postdata(); endif;As nobody had a solutuin I foud a workaround.
Here my solution. Maybe it helps someone 🙂$ev1 = EM_Events::get( array('limit'=>5) ); //newest Events $ev2 = EM_Events::get( array('category'=>'Wichtig') ); //Important Events $ev = array_merge( $ev1, $ev2 ); //merge $postids = array(); foreach( $ev as $event ) { $postids[]=$event->post_id; //create a new query only of the posts } $uniqueposts = array_unique($postids); //remove duplicate postids $args = implode(",", $uniqueposts); echo EM_Events::output( array('post_id'=>$args)); //events output@argosmedia thanks for your hint!
sorry about this!Hi
I call the eventmanager like this:
echo EM_Events::output( array('limit'=>5) );Now I want in addition of this (alll events) add all events whith the category = ‘Important’ sorted by Date if possible.
This shoud show in addition of the limit.Is here a way to do this?
PHP-Code with a brief explanation welcome.Forum: Plugins
In reply to: [Ultimate Responsive Image Slider] plugin duplicates postsADDITIONAL INFORMATION
I foud out, that calling the slider like this causese the issue. Is there something wrong with this?
<?php $args = array( 'posts_per_page' => 8 ); query_posts($args); if ( have_posts() ) : /* Start the Loop */ while ( have_posts() ) : the_post(); echo the_content(); endwhile; endif; ?>Hi Frank
great plugin!
But I have the issue, that the first two posts get duplicated when i activate the slider.
I explain: I have a blog showing the first 8 posts.
Post one: only text
Post two: text and a slide
Post tree further (lets say only text)So activating the slider the first and second post are shown correct. Then the first and second posts are duplicated and the slide shows the loading.png.
The further posts are shown correctly again.see example: http://preview-web02.148935.aweb.preview-site.ch/blog/
Thanks for a reply
MarkusHi timrv
after reeserchig the issue I found the reason.
Probalby by copying the code for the Eventlist from your page, I copied the code + endcode-tag too. So after deleting it in WP-html-editor the space disapeared.
So I regard this as solved.
Thanks anyway
MarkusThanks for your answer.
As I test localy, there is no possibility to send you a link concerning the issue.
If you have a upload-link I could provide a printscreen with the Inspector opened.Meanwhile I went to my own theme and the issue does not exist there (even its a clone of twentyseventeen and twentyseventeen has the same behaviour).
Before I just activated the latest theme twentytwenty and the most recent WordPress.
There the issue was and still is present.