Forum Replies Created
-
AuthorPosts
-
EddyPiV
ParticipantThanks Peter. I'll figure it out further. Looks good!
December 5, 2022 at 1:07 AM in reply to: ✅Bigger thumbnail for featured image of related post id #39495EddyPiV
ParticipantHi Peter, thanks a lot, that was helpful.
EddyPiV
ParticipantI found that, thanks Peter
EddyPiV
ParticipantI managed to get it to my liking.
EddyPiV
ParticipantI have sent the info you requested. Thanks for your help.
EddyPiV
ParticipantHi Long,
The code I gave you before is for listing all video's. That works through view type = shortcode.
In another view the details of a video is shown (view type = singular), there the code works nicely.Back to your question, here is the code for the checkbox list field.
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'VideoDetails', 'your-text-domain' ), 'id' => 'videodetails', 'post_types' => ['video'], 'fields' => [ [ 'name' => __( 'Keywords', 'your-text-domain' ), 'id' => $prefix . 'keywords', 'type' => 'text', ], [ 'name' => __( 'Length', 'your-text-domain' ), 'id' => $prefix . 'length', 'type' => 'text', ], [ 'name' => __( 'Trailer', 'your-text-domain' ), 'id' => $prefix . 'trailer', 'type' => 'url', ], [ 'name' => __( 'Platform', 'your-text-domain' ), 'id' => $prefix . 'platform', 'type' => 'checkbox_list', 'options' => [ 'F' => __( 'Fansly', 'your-text-domain' ), 'LF' => __( 'LoyalFans', 'your-text-domain' ), 'OF' => __( 'OnlyFans', 'your-text-domain' ), ], 'std' => true, 'inline' => true, 'select_all_none' => true, ], ], ]; return $meta_boxes; }May 26, 2022 at 11:41 AM in reply to: ✅How does MB Avatar Plugin enable the front end user to upload his avatar? #36190EddyPiV
ParticipantLong, works like a charm.
Thanks a lot, completely to my liking now!
May 24, 2022 at 10:38 PM in reply to: ✅How does MB Avatar Plugin enable the front end user to upload his avatar? #36166EddyPiV
ParticipantI did add the code to the functions.php file, but it's not affecting the profile picture. Changed it back to Single Upload fieldtype. Still no luck.
Then I did a plugin conflict test. It's conflicting with the BuddyBoss Platform Pro plugin. I also tried with priority 1 in the add_filter, but no difference either.
I think I will have to proceed with the BuddyBoss avatar, although it comes with a bunch of other stuff that I don't like.
Thanks Long for your help.
May 23, 2022 at 12:02 PM in reply to: ✅How does MB Avatar Plugin enable the front end user to upload his avatar? #36140EddyPiV
ParticipantHi Long,
All that I understand. But for doing so, I don't need to install & activate the MB User Avatar plugin. Actually, that plugin results in another field in the user profile than the created custom field. So with the plugin active I have 2 profile image fields.
I am puzzled about the so called solution of the MB User Avatar. It seems not to be used at all.
Or am I missing something?Then back to how to get it working. I think I have done all what's in the documentation (deactivated actually the Avatar plugin), but the WordPress Profile picture is not changing. I guess that's what you mean with "single_image with code", is that the code in the functions.php file?
Can you help me with the code that needs to be changed?May 17, 2022 at 1:50 PM in reply to: ✅How to query for user profile fields of the author of the current post? #36054EddyPiV
ParticipantI think I tried that, but didn't work. I must have made a mistake then, as it works now nicely.
Thanks Long
May 16, 2022 at 3:10 PM in reply to: ✅How to include private posts in overview of posts for author #36039EddyPiV
ParticipantHi Long, apparently both posts_per_page and numberpost work, but I changed according to your advise.
Yes, private posts are showing now.Thanks, working fine.
EddyPiV
ParticipantThanks Long, I found the solution through the FB group. Can you close this threat?
EddyPiV
ParticipantI understand what you're doing. But I'm concerned that over time, when both the number of recipes and the number of sales are growing, the performance will become an issue. And with an installed base by then, I'm afraid that getting that solved can become quite a headache.
Therefore I'm looking into a view per set of recipes, I'm sort of hardcoded reading the posts of the set (in this case 11 posts) and subsequently reading/checking which recipes of this set exist for the current user. I.e. getting the post based on the permalink with the username in it.
This way the number of posts to be read is limited to 2x number of recipes in the set.But my question then is how to read the post by permalink, and how to do the proper coding for the condition if the post exists.
Hope you can help me with that.
Thanks a lot!
EddyPiV
ParticipantHi Long,
Thanks for helping me each time a step further.
I find it hard to find all answers myself in WordPress codex and in other sources, although I'm spending hours on it. And yet I have to come to you with what I believe are so basic questions.
I managed to get everything in order. Only part left ìs the condition if a recipe for the buyer exists.
I'll share my code. It results in a critical error on the website.
First I read the standard recipes from 1 package. Then I'll check which recipes of the package exist for the current user, and I show the details. (slug for the recipe for the buyer = <userid>>-recipe-01 etc.)'''
{% set args = { post_type: 'xtra', include: [ 281, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292 ], order: 'asc' } %}
{% set posts = mb.get_posts( args ) %}
{% set user_ID = mb.get_current_user_id() %}
{% set abs_path = 'https://example.com/xtra/' %}
{% set rel_path = 'xtra/' %}<div class="xtra_container">
{% for post in posts %}
{% if ( $page = mb.get_page_by_path( {{ rel_path }}{{ user_ID }}-{{ post.post_name }} ) ) %}
{
<div class="xtra_item">
{% set post_link = mb.get_permalink( post.ID ) %}
<h3>{{ post.post_title }} </h3>
[su_row][su_column size="1/2" center="no" class=""]{{ mb.get_the_post_thumbnail( post.ID, 'thumbnail' ) }} [/su_column]
[su_column size="1/2" center="no" class=""][icon name="calendar-check" prefix="fas"] {{ post.post_modified | date( 'F j, Y' ) }} <br> [icon name="comment" prefix="fas"] {{ post.comment_count }} [/su_column][/su_row]
</div>
}
{% endif %}
{% endfor %}
</div>
'''Can you help me to get this corrected?
EddyPiV
ParticipantActually, my question is more complex.
Clients can buy a series of recipes. They become gradually available to the buyer.
There is a standard set of recipes, with permalinks .../cpt/recipe-01, -02, -03 etc.
At preset interval the next recipe of the standard set is released to the buyer, by copying the standard recipe to .../cpt/<username>-recipe-01, -02 etc.
This is all working fine.I want to show an overview of the released recipes to the buyer.
For several reasons I want to do that with the standard set of recipes as starting point, by looking if the permalink .../cpt/<username>-recipe-01, 02 etc. exist.Therefore I need the following steps:
- determine the slug of the standard recipe (my starting question)
- find out for each recipe if a post for the buyer exists.Next to my starting question on the slug, I'm having difficulty with
- getting the username
- determining if a post for the buyer exists.I hope you can help me.
-
AuthorPosts