Forum Replies Created
-
AuthorPosts
-
Viktor
ParticipantI'm using Oxygen, so no theme, but even with a theme it obviously won't know how to call this CPT unless it is manually translated. Abstracting from the tab's title, how do you usually translate the names of the CPTs created in MetaBox
Viktor
ParticipantThanks for the reply Long. I want to translate the name of the CPT. I have already enabled the CPT in Polylang and can create posts in each language, and archives work correctly. It's just that the title of the archives is always the plural name that I have set in MB and I don't know where to translate it.
January 15, 2022 at 3:38 AM in reply to: ✅Single Image custom field is not showing in frontend #33239Viktor
ParticipantI just faced the same issue on the Oxygen 3.9 release. Wasn't it fixed in the final version?
Viktor
ParticipantThanks for acknowledging it and providing the previous version. I was also surprised by this bug.
Viktor
ParticipantThanks Long!
Can I pass all the js_options this way as well? Could we also use these options with standard Views methods?Viktor
ParticipantAfter further research, I realised the issue is coming from MB Views actually. If I show the map using
rwmb_metait works fine, however, using MB Views as a shortcode containing this:{{ post.mb_sites_map.rendered }}always uses the hardcoded Maps API key in metabox and ignores mine in the MB Builder.How can we use MB Views for Google Maps with our own API key then?
August 25, 2021 at 3:24 PM in reply to: WPML Media translation not working on "image advanced" fields #30422Viktor
ParticipantThanks Long but would this also make the images show on the back-end in the translated posts or is it just a solution for the front-end? In my case the images are missing in the back-end and hence in the front-end as well.
Viktor
ParticipantHere is a
var_dump(clone):array(2) { ["retailer_price"]=> string(3) "450" ["retailer_cpt"]=> array(9) { ["ID"]=> int(14) ["title"]=> string(16) "Some retailer" ["excerpt"]=> string(0) "" ["content"]=> string(0) "" ["url"]=> string(55) "https://example.com/retailer/some-retailer/" ["slug"]=> string(16) "some-retailer" ["date"]=> string(19) "2021-08-06 07:15:07" ["modified_date"]=> string(19) "2021-08-06 07:23:01" ["thumbnail"]=> array(8) { ["thumbnail"]=> bool(false) ["medium"]=> bool(false) ["medium_large"]=> bool(false) ["large"]=> bool(false) ["1536x1536"]=> bool(false) ["2048x2048"]=> bool(false) ["post-thumbnail"]=> bool(false) ["full"]=> bool(false) } } }My goal is to sort the
clones byretailer_price. Everything is an array, so I am not sure why it shows type "Null" in the logs.Viktor
ParticipantHere is the log of the error:
[06-Aug-2021 20:43:00 UTC] PHP Fatal error: Uncaught MetaBox\Dependencies\Twig\Error\RuntimeError: The sort filter only works with arrays or "Traversable", got "NULL" in "relationship-view" at line 1. in /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Extension/CoreExtension.php:914 Stack trace: #0 /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Environment.php(358) : eval()'d code(38): twig_sort_filter() #1 /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Template.php(394): __TwigTemplate_fe2758630feb60b056deac33be7db367a9a38638a1d420f2e9909dcd82463035->doDisplay() #2 /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Template.php(367): MetaBox\Dependencies\Twig\Template->displayWithErrorHandling() #3 /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Template.php(379): MetaBox\Dependencies\Tw in /var/www/wordpress/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/dependencies/Twig/Extension/CoreExtension.php on line 914Viktor
ParticipantI managed to use clonable groups and the sort method of twig as in here: https://stackoverflow.com/a/57934908/7132379
Viktor
ParticipantHi Long,
Thanks for the reply. Perhaps I wasn’t clear.
I want to have a table like this - link but allow the the user to manually select which posts to compare. I was thinking of this working through a modified shortcode but maybe I can set a clonable dropdown field to select the table columns which MB Views then cycles through and pulls. What do you think?
ThanksViktor
ParticipantIt seems the problem is caused by the "exclude from search" option in the custom posts. The same problem as here:
https://github.com/wpmetabox/mb-relationships/issues/9
https://github.com/wpmetabox/mb-relationships/issues/39
What exactly do we need to implement the fix?Viktor
ParticipantI played a bit more with it and out of 4 post types, the admin columns work fine on 2 but have the problems described above for the other 2. I really cannot figure out what is going on.
-
AuthorPosts