What is the index [0] for on post meta fields?
Trying to improve my PHP knowledge through test and try! I am confused on [0] arguments at following WordPress PHP code
Trying to improve my PHP knowledge through test and try! I am confused on [0] arguments at following WordPress PHP code
I would like to retrieve multi-dimensional arrays (that have been created with metaboxes), & display them on the front end of a website using shortcodes.
Three people have already tried to solve this, and we’re coming up nil. I want to show only posts that have a value in the meta_key ‘featured_image’.
I am trying to get a query to retrieve all the posts where a specific meta_key does not exist and then create it.
I found an XML to WP decoder script that stores the data as an array in a custom meta field. What is the best way to extract the information?
I have a site using Advanced Custom Fields to create and store various bits of relevant info. These need to be included in the main general search, which by default only searches the title and main content.
When developing plugins that requires data storage, what’s the pros and cons of using one method or another ?
I have a function that stores the “like” status for a post as post meta. I want to associate that “like” with the user that liked it, so I setup a custom field called “like_status_{user_id}” (where {user_id} is the id of the currently logged in user) which I store as a 0 or 1. So for a post with several “likes” there would be several meta values in the db that are setup like this:
These are the functions I use in my theme to display the “entry-meta” which includes published and last modified dates (among others) of an article:
I have multiple author accounts on one of my WordPress installs. Often I will create a post, and set the author to be a different account. However, when I upload images into that post, their attachment page lists the author as my account. How can I set the author for posts, and have it carry over to the media associated with that post?