Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Sam, we actually done that for WP Auto Listings plugin. Here is a quick video to show you how it's done: http://recordit.co/sJmMETYBIu. It has a lot of custom code for the premium feature, so I couldn't share here.
February 26, 2019 at 10:28 AM in reply to: ✅Change Destination Of Custom File Upload Field Type #13476Anh Tran
KeymasterHi,
To avoid the complexity, I avoided using predefined variables for things like site number in multisite network. But you can always do that with a little code, like this:
function prefix_get_site_upload_dir() { return WP_CONTENT_DIR . '/uploads/sites/' . get_current_blog_id() . '/my_uploads/'; }And in the field settings, set:
'upload_dir' => prefix_get_site_upload_dir(),Anh Tran
KeymasterHi,
Thanks a lot for your code. There was a CSS bug with the textarea for tabs-left style, which has just been fixed in the recent version. Please update.
Anh Tran
KeymasterHi,
Unfortunately, we don't have such field type :(. Please try to use cloneable select/radio field, which can help do almost the same thing.
Anh Tran
KeymasterHi Nick,
In this situation, you definitely need way to connect reviews to an event. And that's a relationship between Event and Review. So, using MB Relationship is a perfect in this case.
Anh Tran
KeymasterHi Hein,
You have 2 cloneable fields, so when you use the shortcode to output, each of them will output in a unordered list.
To fix this, please use this PHP code instead of shortcode:
$texts = rwmb_meta( 'text_1' ); $urls = rwmb_meta( 'url_1' ); if ( ! empty( $texts ) ) { echo '<ul>'; foreach ( $texts as $k => $text ) { echo "<li><a href='{$urls[$k]}'>{$text}</a></li>"; } echo '</ul>'; }Anh Tran
KeymasterWe have a demo site at https://demo.wpautolistings.com, but we don't have demo account yet.
Anh Tran
KeymasterSorry for the frustration. I'll check that next Monday and will fix the bugs if there's any.
February 22, 2019 at 7:58 PM in reply to: ✅No custom post fields for Authors and Editors with Guttenberg #13441Anh Tran
KeymasterOh, I got it. These user meta are used by WP to store meta boxes state (visible/hidden) and their order (users can reorder). Looks like Gutenberg doesn't handle these settings properly.
Yes, you can remove them without any problem. Meta Box won't be affected by that.
Anh Tran
KeymasterHi, I've just added that to the plugin. See it on Github. See sample code.
Anh Tran
KeymasterHi Lukas,
If you see "No results found", then the autocomplete works. It queries to Google and no results found, it notices you about that.
Can you try setting the language or the region of the map? It might help to provide some results.
Anh Tran
KeymasterIt looks fine to me: https://imgur.elightup.com/vMKGtCU.png. Can you send me the full code to check? I see you have several fields with tabs.
February 22, 2019 at 4:31 PM in reply to: Can I add custom CSS for a post based on a Meta Box field state? #13434Anh Tran
KeymasterI think your solution is great. It might be a little bit tricky, but it works. While working with BB, I also did some tricks like that.
I'm thinking about another (similar) solution that might not need an textarea. I'd insert an HTML module with the CSS code, and use BB's Conditional Logic to hide it when the event is not repeatable. I think it's shorter than your solution.
February 22, 2019 at 4:23 PM in reply to: ✅No custom post fields for Authors and Editors with Guttenberg #13433Anh Tran
KeymasterGutenberg submits posts via Ajax, but the Include Exclude extension that you're using uses PHP to filter the meta boxes. So, it needs refreshing the page.
To make it work without refreshing the page, I'd suggest using Conditional Logic. However, it doesn't work with WordPress's category box yet.
February 22, 2019 at 2:43 PM in reply to: ✅Conditional logic does not work based on a taxonomy field #13430Anh Tran
KeymasterHi Hansjakob Fehr,
I misunderstood in the previous replies. My replies above worked for WordPress's taxonomy box.
For your situation, as the conditional field is just a normal Meta Box field, you don't need complex conditions. Instead, you can just write:
'visible' => array ( 'when' => array ( array('medium', '=', 2 ), ), ),Where
2is the ID of the termbuch. The taxonomy advanced field uses term IDs, so we have to use them instead of slugs. -
AuthorPosts