Support Forum
Support › MB Favorite Posts › Customizing the background color, the dashboard AND More
Hi Long!
I hop you're doing well.
I'd like to use MB Favorite Posts on my site but I feel like the extension is missing some basic features to make it go from nice(!) to great(!!).
Note that I'm not a web developer, so any suggestion requiring to code will be hard for me (and many others) to implement without a proper tutorial explaining what to put where.
1. I see there are two different texts fo the button (such as "Like" and "Liked").
-> Could you apply the same logic to the background colors?
In my case, I'd like to have a vivid color when the post is bookmarked and light grey when it is not.
-> In the "Liked" status, could you make the button clickable in order to remove the post from the favorites (rather than having to go to the dashboard and click on the bin icon)?
2. Using Gridbuilder WP on my site to display a filterable grid/gallery of posts (CPT), I'd like to add a MB Favorite icon on each card within the grid/gallery. See an example of a Gridbuilder grid in action here: https://demos.wpgridbuilder.com/blog/. I contacted the dev of Gridbuilder to know if it would be possible and he said:
If MB Favorite Posts allows a shortcode to be used, it is possible to add it in a raw content block but the shortcode will have to the post ID as an attribute in order to render the correct content.
By default, your shortcode does not include (I say "include" because I assume that's what he meant by saying "accept") the post ID: [mbfp-button]
-> So does that mean that MB Favorite Post can't work inside a filterable gallery made by Gridbuilder? Comment: note that they have an extension for Meta Box but I doubt it is tailored for this particular use case.
3. The design of the dashboard by default is very minimalist.
-> Could you add to the list of your future video tutorials one that will explain in detail to non-developers like me how to add the featured image, customize the design, display custom fields and more?
4. When the "Enable non logged in" box is not ticked, I would prefer not to display the button to non logged in users rather than having something like this: https://youtu.be/fSFmNp-Ayew?t=194.
-> Can you let us decide whether we want it to appear or not?
5. According to https://docs.metabox.io/extensions/mb-favorite-posts/, it looks like the information under the General tab is for all ticked posts. Could you improve the extension to make sure we can set different rules fo different CPTs?
6. I noticed that when we change the value of the "Pre built styles" parameter, the button color (Button tab) and icon color (Icon tab) previously customized get back to default.
Thanks in advance.
Laurent
Hi Laurent,
Thank you for your feedback.
1, 3, 4, 5, 6. I will inform the development team to consider supporting these requests in future updates.
2. If the post ID is not passed to the shortcode [mbfp-button]
, it will take the post ID of the current post which might be the page in your case. MB Favorite Posts can work with a list of posts (in a query loop) but you need to pass the post ID to the attribute id
of this shortcode. Something like
// The Query
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
echo do_shortcode( '[mbfp-button id="'. get_the_ID() .'"]' );
}
echo '</ul>';
}
wp_reset_postdata();
You can try to contact GridBuilder support to ask to get the post ID in their loop and pass it to the button shortcode.
Thank you Long. I hope my suggestions regarding #1 #3 #4 #5 #6 won't fall through :-).
Regarding Gridbuilder, here is what the dev Loic told me:
There is no integration with FB Favorite Posts.
It is however possible to use this shortcode in a card:
[mbfp-button id="{{ post.id }}" class="custom_class" add="add_text" added="added_text" show_count="true"]
As for #2, where am I supposed to paste the code snippet you gave me? And is it still needed if I do what Loic said above?
Hi Laurent,
As Loic said, you can contact GridBuilder support to ask how to pass the post ID to the MB Favorite shortcode to display the button on each post in the list.
Then you can add the shortcode in the block, or the template of list posts like the code above.
Hi Long, Loïc IS Gridbuilder support, which is why I pasted what he told me because it could help other customers of Meta Box.
Hi Laurent,
Let me explain this case again.
You are using a block of GridBuilder to display the grid/gallery posts and want to add a favorite button on each post. Our plugin supports a shortcode to display in the grid posts but you have to pass the post ID to the button attribute id
. So the main goal is how to pass the post ID dynamically to the favorite shortcode in the GridBuilder block and it is beyond the scope support of Meta Box. We do not how it works to get the post ID.
I've been looking for a solution for this for ages as well. Laurent, did you get this working?
I am also interested in all the other stuff mentioned. Having a block of favorite posts with options similar to the "Dashboard" block would be super-nice.