Forum Replies Created
-
Author
-
kcurlsjrParticipant
Hi,
Thank you @Laura and @Radu for your response.
@Radu I tried the solution suggested , however I don’t know why but because ‘Kleo Posts’ is a custom query, the method I am calling on action hook ‘pre_get_posts’ is unable to filter the query.
Please find below the code I am using to hide restricted posts:
************************************************
add_action( ‘pre_get_posts’, ‘pmsc_exclude_post_from_query’ );
function pmsc_exclude_post_from_query( $query ) {if( !is_admin() && $query->is_main_query() && function_exists(‘pms_is_post_restricted’) ) {
$args = $query->query_vars;
$args[‘suppress_filters’] = true;
$args[‘posts_per_page’] = get_option( ‘posts_per_page’ );
$posts = get_posts($args);$ids = wp_list_pluck( $posts, ‘ID’ );
$restricted_ids = array_filter($ids,’pms_is_post_restricted’);$query->set( ‘post__not_in’, $restricted_ids );
}
}
************************************************************************************
In the above code : pms_is_post_restricted is a function defined inside the membership plugin files that checks if the current user has any posts they are restricted from . Then by using array_filter we are able to get a list of post IDs that should not be included in the query.One possible solution:
Can a hook to be added inside:
kleo/vc_templates/vc_posts_grid.php
over the WP_Query args? If so then I can modify the query in kleo posts before its called.Please do let me know.
Thank You
kcurlsjrParticipantHello,
I have this same issue. It there a way to filter out the Post Ids from the post query so that restricted posts do not show up for members who don’t have access to them?
Looking forward to a response.
Thank You
kcurlsjrParticipantI’ve just tried by re-building a new post-grid and filtered them using the query button.
Still the membership levels are ignored.
January 29, 2015 at 20:25 in reply to: Thumbnails Missing from Left thumb Blog Layout on Video and Audio Post Types #43987kcurlsjrParticipantYes, Radu, but the post type must be set to audio in order for the audio file added via the Media Tab to be displayed.
If you set the post type to “standard” (as I described in my previous post) the file isn’t displayed on the page.
January 29, 2015 at 01:18 in reply to: Thumbnails Missing from Left thumb Blog Layout on Video and Audio Post Types #43839kcurlsjrParticipantYeah, the problem was that I hadn’t put any media in the post yet… therefore the blank space.
It works as intended once an audio file is inserted.
But that presents another question: If I want all posts to have a featured image in the blog archive, is there an easy way to embed an audio file in a post that has the “standard” format?
I see there is a video embed component to the visual composer, but can’t find an audio embed.
September 24, 2014 at 21:23 in reply to: Comments section hr-title does not display with 0 comments #29623kcurlsjrParticipantAfter updating Kleo to 2.0, blog posts that have comments disabled now shows a 0 Comments divider. Is there a way to hide it?
September 23, 2014 at 18:36 in reply to: Are new media query breakpoints needed for the iPhone 6 plus? #29411kcurlsjrParticipantWhatever was wrong has been remedied by the v2.0 theme update.
September 15, 2014 at 21:38 in reply to: Membership-restricted posts still populate Post Grid #28714kcurlsjrParticipanthey, @Catalin
Would that be any different from selecting “Post Grid” while using the WPBakery Visual Composer to edit the page?
That is what I am doing and the post grid that results doesn’t adhere to the membership restrictions on specific posts.
September 9, 2014 at 03:15 in reply to: Activity Stream Not Showing Links In Blog Posts Correctly #28077kcurlsjrParticipantWould this be the same reason that “@username”–when this feature is used in a status update or forum post–also do not displayed correctly within the activity stream?
If so, great news that a fix is on the way. Such a minor thing, but always bugged me.
kcurlsjrParticipantYeah, @abe that was my issue post 1.5 update.
@splendor edit the page that the slider is currently on. From the backend Visual Composer, edit the row the slider is in. The second item down is “Inner Container” … yours is likely set to “yes.” Change it to “no.” After saving those changes, my sliders returned to the full-width they were prior to the 1.5 update.kcurlsjrParticipantI’m not sure what we did, but after a few more updates to that page (we are still in the early stages of working with this theme) it seems to have popped in. Perhaps there was a conflict with something… but as of now it seems remedied. I’ll post back here if I can replicate it again.
kcurlsjrParticipant@sharmstr That’s pretty sweet.
Think it would be too difficult for me to mod it to do something similar for BuddyPress groups, but instead of post authors it would use tags?
Or perhaps anyone knows of an existing solution.
kcurlsjrParticipantActually I take that back. — I guess I should have tested before I posted.
If I change the post type to something other than video (e.g. standard or aside), yes the featured image is displayed in the masonry grid… but the video disapears from within the post.
Is there any way to have a post containing a video, but also uses the featured image in the masonry grid?
kcurlsjrParticipantNever mind I found the solution in another thread: just don’t use the video post type.
Is that really the only thing that differs about the video post type?
kcurlsjrParticipantJust for future reference, does it matter if we do the automatic update while running a child theme? Or should we switch back to the default Kleo theme just to be safe?
kcurlsjrParticipantAh that makes sense. It has been a while since I’ve done a fresh build and forgot about some of the intricacies of bbPress. As I was wrangling with the issue discussed in this thread, I was also trying to figure out if KLEO was responsible for the bbPress activity not showing up in the BuddyPress activity streams.
However it had nothing to do with the theme, rather the same search filters:
http://buddypress.org/support/topic/bbpress-forum-posts-not-appearing-in-activity-stream/
kcurlsjrParticipantI’ve experienced the same problem.
Fresh site, PMPro plugin installed.
When I set up the bbPress forums and began testing the first post wasn’t displayed. This was the case for topics in both group-specific and general forums.
After reading this thread, I deactivated the PMPro plugin and the missing first forum posts became visible!
-
AuthorPosts