Underscores in custom fields
While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name.
While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name.
I’d really like to take all of my old posts, and automatically use the meta descriptions we have written – currently done for each post using All In One SEO Pack – and copy them to also be our post excerpts.
I currently have some code that I am using to add a Custom Field (An advertisment) after 3 paragraphs as below:
I am trying to add a field to WordPress posts (not pages) which would simply include a label and a checkbox. Something like: Make this the sticky post? If check, the key should be set to TRUE or something that is easily accessible. The problem is, however, that I only want one post to have possibly the TRUE value. This means, when I have checked the field in post-1, and afterwards I check that field in post-2, post-1’s field value should be set to FALSE so that only one post can have TRUE at the same time.
Say I have an array of checkbox choices associated with a post (a custom field) stored in the database in serialized form. On my site, I present users with the same checkboxes and let them make their choices to “filter” out posts according to their choices. If as little as one of their choices matches a posts choices, that post should be displayed.
Is it possible to remove a default attachment field from the attachment editor, for example the “Caption” field ?
Why wont the custom fields from this post type save?
I need to get posts pertaining to a given category, AND :
I have a main parent page with multiple sub-pages. The main parent page has some custom fields (meta boxes?) with specific values. My intent is to add dynamically these custom fields and their values to all sub-pages. I searched a solution but without success. Is this possible? And how?
I’m using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I’m assuming that there is some kind of filter that removes HTML code from custom fields when a post is saved. Is there a way to circumvent that without using a plugin?