johaan89
Forum Replies Created
-
Man, looked into my upload folder and found random string php files in there. it’s a good thing i had php disabled in those directories.
I also found a random string php file inside my html folder… time to restore to a backup.
Sorry but this plug-in is a gaping security hole.
I can forgive the CSS since that can be easily combined manually or with a plugin
The Javascript files on the other hand can’t be combined since they break the plug-in.
Seriously though 40+ files? Great plug-in but what where you guys thinking.
hmmmm, should have tinkered around more before making this question. I just echoed the variable inside the data-post-in to get the ID’s, though i can see this getting the html messy if you have hundreds of posts ID’s being called.
- This reply was modified 7 years, 1 month ago by johaan89.
hmmm I should have tested normal post ID’s too. Yeah that does work when you input the raw ID’s
data-post--in="2678"
<—– this works
data-post--in="'. implode(',', $postidsfromquery->posts) .'"
<—— this doesn’t
(disclaimer im still learning PHP so I might be doing something facepalm worthy haha)
Forum: Plugins
In reply to: [Related Posts for WordPress] Return only Post IDsNevermind did some custom code since there’s no function built into the plugin to retrieve posts IDS
Picking up a premium license since I like the results it produces with its tag, title algorithm
should probably make it easier to retrieve post ids though, even if it’s premium only.
Well… nevermind I was able to figure it out. Here’s the code I used to have ajax more load a list of user favorited posts
<?php $favorites = get_user_favorites(); if ( $favorites ) : // This is important: if an empty array is passed into the WP_Query parameters, all posts will be returned $favorites_query = new WP_Query(array( 'post_type' => array('post'), 'ignore_sticky_posts' => true, )); while ( $favorites_query->have_posts() ) : $favorites_query->the_post(); $favorites[] = $post->ID; endwhile; ?> <?php endif; wp_reset_postdata(); ?> <?php echo do_shortcode('[ajax_load_more post__in="'. implode(',', $favorites) .'" orderby="post__in"]'); ?>
unless there’s a better way of doing this?