Articles of custom field

How to save taxonomy term meta?

Since, WordPress don’t have taxonomy metadata support for saving taxonomy custom form fields, I am currently thinking of using options API. But the 1MB options size limit on is what’s troubling me. Originally, I had thought of adding an option say ‘my_plugin_term_meta’, which will then have term meta indexed by the term taxonomy id(not […]

Metabox will not save

I’m trying to create a metabox in a custom post type. When I attempt to insert information into the Listing Price box and update the post, the information is not saved and disappears once the page reloads. Please take a look at my code below and let me know if you see anything that could […]

Understanding and using metaboxes in posts

I am developing my first theme that is not dependent on a parent theme but I am running into some back-end problems. I’m trying to add a metabox to all posts that are being written. This question is quite broad in that it covers quite a lot of features. So if that’s preferred I will […]

window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes

I have added two custom meta boxes to a custom post type. One is to upload an image to be stored in a custom field value for a “headshot” and the other is to upload an image to be stored in a custom field value for a “column headshot”. It’s a news site. Both send […]

Get a post_id where meta_value equals something in a serialized meta_value field

I’m storing CPT products‘ post IDs into CPT companies‘ post meta (meta_key = prefix_products). As a company can have multiple products, so I’m storing them into a PHP serialized array value. s:48:”a:3:{i:0;s:3:”334″;i:1;s:3:”333″;i:2;s:3:”331″;}”; Where 334, 333, 331 are three post_ids of post type products. I need to get the post_id of the CPT companies where the […]

Display posts if a custom field value is equal to another custom field value

I have 2 custom post types “Shops” and “Restaurants”. Each of these have custom fields associcated with them. For example, One field in Shops is “Shop ID” and one in Restaurants is “Restaurant ID”. I want to query both Custom Post Types and if Shop ID is 20, I want to display all Restaurants with […]

Complex WP_User_Query call fails on production server

I’m having a very specific and hard to debug problem with a complex meta_query in a WP_User_Query call: I’m using this (simplified) code to built the query: // custom user role $arguments = array( ‘role’ => ‘member’ ); // number and offset $arguments[‘number’] = 10; $arguments[‘offset’] = 0; $meta = array(); $meta[‘relation’] = ‘AND’; // […]

Last modified field for user profile?

Is there a plugin or a known way to track user profile changes and save a last modified date in WordPress? I tried with ACF, but it doesn’t have an option to auto update this field. Thanks in advance.

Json api does not return all metadata

I am using this plugin to create a new entry is saved correctly in the database all the wp_postmeta customfield table, but when you run api/get_post/?post_type=job_listing&post_id=542 the result is not complete, only gives me some customfield. exampler: meta_key meta_value _company_phone 89998983 //not shown _company_website //not shown geolocation_LOG -36.98898838 //if displayed geolocation_lat -76.98898838 //if […]

Masking Affiliate URL using $post_slug after “/go/”

I am trying to figure out how can I redirect a masked URL based on a custom field URL. If I have a masked URL: echo ‘<a href=”’. $post_slug .’/” class=”button”>Click here to save ‘ . $discount_percentage . ‘% on ‘ . $title . ‘</a>’; Then how can I redirect this URL to a […]