Can we have duplicate key pair values in post meta data?
Can we have duplicate key pair values in post meta data?
Can we have duplicate key pair values in post meta data?
In the end, I’ve managed to do in this way (function( plugins, editPost, element, components, data, compose ) { const el = element.createElement; const { Fragment } = element; const { registerPlugin } = plugins; const { PluginSidebar, PluginSidebarMoreMenuItem } = editPost; const { PanelBody, ColorPicker } = components; const { withSelect, withDispatch } = … Read more
As I already pointed in the comment, all you need to do is change your orderby parameter so that the meta_prio is the first item and followed by the meta_start. So your orderby should look like: // This array forms an ORDER BY clause with each array item being a column that // MySQL use … Read more
How to modify default meta link format
You have typo error in $post->ID as you don’t have $post variable, and it really could cause you feel that it doesn’t work, at least it will not calculate new value. So here’s modified approach. I’ve also used different hooks to trigger action when it’s really necessary and not for every comment_status transition. /** * … Read more
I found the cause of the problem I was having. Since the post type I was working on was woccommerce orders (shop_order), I had to enter the post status correctly. The edited code is as follows: add_action(‘save_post’, ‘change_child_posts_meta’, 10, 2); add_action(‘post_updated’, ‘change_child_posts_meta’, 10, 2); function change_child_posts_meta($post_id, $post) { if ( $post->post_parent == 0 && ‘shop_order’ … Read more
If I uncheck sections in the screen options GUI, does WP still try to update the associated post meta within that section? This won’t speed up saving, that markup needs to be generated otherwise JS can’t show/hide it on the frontend. On top of that, the data still needs to be saved, but wether that … Read more
URL from get_post_meta() is broken my URL
Check if any meta on the post has value then display content
According to the database schema, the meta_value is stored as longtext. It is probably because of generic purpose. So, to obtain a numeric value. There are 2 parts for doing so. Saving Although it is storing as longtext, it is still good for preparing the rightful numeric format so that when retrieve it, it is … Read more