Count of posts by different parameters?
I need to get the count of posts (just a number, nothing else) by custom taxonomy AND post meta(string) but I can’t find a good way to combine them both. Im fairly new to programming & WP, Im not...
View ArticleHow does WP decide how to display a page
I am new to WP. I tried reading up as much as I possibly can online, and via browsing through the files. As far as I can tell, no physical pages/links are stored on the disk, so when a page is created,...
View ArticleHow to add together (get the sum) a field from all author's posts
Using the plugin WPeddit I want to count the epicredvote score from all posts of an author together to get the sum. The following is a custom field that puts out a score, like “3″ or “-2″ or whatever:...
View ArticleAdd multiple meta keys to a post at once
I figured how to add an input value as a meta key value to a new post from a frontend post form (thanks to @thedeadmedic), but I can’t figure how to add two or more meta keys at once. Is this possible...
View ArticleInsert image caption (metadata) in shortcode in functions.php
I’ve created a shortcode that displays a random image given that certain parameters are filled, like img url and number of images to random through. It looks like this: function randimg_shortcode(...
View ArticleFind page metadata in database
I want to insert metadata to custom fields (from “advanced custom fields” plugin) manually (with wp_update_post_meta). I need to know how the meta value strings look like so I can insert this kind of...
View ArticleCompile meta values from custom loop into array and then calculate sum total
I tried explaining this yesterday but I fear I made things more complicated than they needed to be. I have a custom loop that pulls through standard WordPress posts with various arguments. $args =...
View ArticleHow to use WordPress Functions in php file linked to email piping
I’m writing an plugin to add meta data to a post when I receive an email. So far my plugin receives the email correctly, but I need the WordPress functions to update the metadata. I can already get the...
View ArticleGenerate meta_value programatically for thumbnail in Ruby
I am inserting posts in wordpress db using ruby. The problem is that adding a post thumbnail, there is a met_value field in post_meta table that has an auto generated hash which looks like...
View ArticleGet draggable widgets on Edit Post page
Is it possible to get the widgets with settings (just as widgets.php page) on the Edit post (like attached image) ? There i can define a custom sidebar in post meta. However how to get the list of...
View ArticleHow to add together (get the sum) a field from all author's posts
Using the plugin WPeddit I want to count the epicredvote score from all posts of an author together to get the sum. The following is a custom field that puts out a score, like “3″ or “-2″ or whatever:...
View ArticleSort by meta key within same day
I try to build something that can sort posts by day – and whithin the same day sort them with any meta value (integer) – like popularity or vote or what have you. So that, in the end, i get today’s...
View Articlewp_get_attachment_metadata()['image_meta'] fetch WP metadata or EXIF?
wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) )['image_meta']['credit'] returns nothing although there IS information in the attachment’s credit field. Is wp_get_attachment_metadata...
View ArticleShow values of custom post meta on 'Add new post' page?
I am developing a website in which I am giving my users a separate profile. Their profile includes a dynamic slider. I made a custom post type named ‘Slider’ and added all images using:...
View ArticleHow to get posts with a metadata numeric key greater than X?
I’m trying to add a “Highlighted” section for each category on my website. This will be located in a page, using a shortcode. I’m going to add a new post metadata key which will be a number from 0 to...
View ArticleDefault Custom Field Value Automatically Update
I have created a hidden custom field with a php function as its value. Like so – $value_rating = get_post_meta($Property_Id, 'vr', true); <input type="hidden" name="vr" class="form-control hideit"...
View ArticleEdit is changing my custom's post type parent id
I’m having a custom post type (vehicle) and i attached a gallery (post) with image attachments in it. Through my custom frontend form, I set all the post and postmeta details right, as i want to, so my...
View ArticleAdd a meta to a post submited from a frontend form
I use a frontend form by @TheDeadMedic to post regular posts. I figured out how to add to this form a category and a location (custom taxonomy) dropdown menus, and also how to sanitize and how to...
View ArticleDelete custom post type metadata without deleting the post in admin area
I’m working on a plugin for a client and they need the ability to attach a couple of PDFs to a post as metadata. The client will need to occasionally update these attachments but without deleting the...
View Articlehide posts with specific meta data from admin page
Does anyone have ideas on how to hide posts which has a metadata with a specific value from admin panel (the posts table which is shown when clicking all posts option from posts tab) thank you in...
View Article