Let’s Create Custom Field Template Documentation
Create a public gist or a repository. You can use multiple files per gist, everyone can comment or fork the project. It is like a wiki for developers. 🙂
Create a public gist or a repository. You can use multiple files per gist, everyone can comment or fork the project. It is like a wiki for developers. 🙂
To check for meta key value then display: if ( get_post_meta( $post->ID, ‘venue_info’, true ) ) : echo get_post_meta( $post->ID, ‘venue_info’, true ) endif; via: The Codex
You get custom field values with get_post_meta(). WordPress has a function called wp_localize_script() that’s used to, as the name suggests, localized scripts by creating a javascript object from a PHP array. When you use wp_enqueue_script() to add a script to the front end of wordpress, you can “localize” it by calling wp_localize_script() afterwards. If you … Read more
Twitter, Facebook, and Youtube links/feeds to their individual profiles. Those links/feeds are meta data for posts, so postmeta is the place where you should store them. Easy way to add meta data to posts is Custom Fields, also you can create and use meta box for this purpose. Here is tutorial for creating meta boxes: … Read more
I’ve done something similar using gmaps (http://gmap.nurtext.de/). You might want to take a look at that. It’s self explanatory and there’s quite a bit of documentation IF you google around.
You could use regex to only allow alphanumeric characters. $string = preg_replace(“/[^A-Za-z0-9 ]/”, ”, $string);
You can try to make use of filters in query (likely posts_where) to make it look for match between clean value and MySQL REGEXP command (if it fits, didn’t use it myself) with your logic, run on raw value.
The values you have circled are not part of the custom fields. They are part of the configuration data of Simple Fields. You can find them in the dadabase in table wp_options in the row with option_name=simple_fields_groups. Field option_value contains a string of serialized data. You can read the option with WP function get_option(). It … Read more
I did a search for this phrase: “wordpress remove custom field value from the drop down menu”. A bit verbose perhaps, but it got me this link: http://sumtips.com/2011/03/add-delete-edit-custom-fields-wordpress.html From that page, the author states that you can do one of the following: Delete Custom Field from all posts. Delete it from the database. Delete it … Read more
I had the same problem but I was successful importing from an self produced xml (for the postmeta). <wp:postmeta> <wp:meta_key>telefono</wp:meta_key> <wp:meta_value><![CDATA[$tel_azienda]]></wp:meta_value> </wp:postmeta> The problem was that after that the data were not available to use with MF, I’ve solved it with this mysql query: INSERT IGNORE wp_mf_post_meta (`id`, `group_count`, `field_count`, `post_id`, `field_name`, `order_id`) SELECT `meta_id`, … Read more