Quantcast
Browsing latest articles
Browse All 54 View Live

WPDB Multiple site's posts and get featured images

I am using the code below to query 5 WordPress sites for their posts, merging them into an array, sorting the array by date, and then displaying them: //SITE 1 $mydb = new...

View Article


How to remove Date from Meta Description on SERP?

I noticed on a few recent projects the Date is displaying in the Meta Description for all Custom Post Types and Taxonomies in WordPress. I was always under the impression the Date would usually show...

View Article


Nested array issue in meta_query

I am using following meta_query to search blog post according to following search criteria, search logic : if expire date set, check the expiry of the post, otherwise just include it if...

View Article

WP-API + JS Backbone client – how to update post meta

Using the WP API and Backbone-based JS client, I’m trying to update a post’s metadata as follows: var parentId = 96; // the post id var metaData = new wp.api.collections.PostMeta('', {parent:...

View Article

show ad after # paragraphs

Trying to use ACF to determine when to insert an ad after # many paragraphs. Right now after 3 paragraphs the ad is inserted. if ( is_single() && ! is_admin() ) { $show_after =...

View Article


Best Way to detect unique posts in wp rest api

I am developing an android app for my WordPress blog. I have some bad trouble to detect and get post. So first I give u a vision from what I am into: I want to get post from past, so I do this: Get the...

View Article

is_main_query() never called on WP 4.4

Im fairly new to WP dev, however as far as i can see ive followed the correct procedure in my custom archive page (below). If i remove the check for is_main_query() it wipes the menus out and likely a...

View Article

Get the correct meta_value with get_post_meta

I tried using the function get_post_meta() to get the meta values of my posts. However to my surprise it returns an Array that contains again arrays! So I looked inside the second level array, and was...

View Article


Where does the actual data stored by add_post_meta

I am pretty new to WordPress API, loving it btw, I have a small project, adding a like button to the end of every post, pressing it makes user like the post, button changes to dislike, pressing again...

View Article


Is it possible to retrieve all posts with a certain value for metadata?

Under 4.5, I have posts with meta_key as series and meta_value as 19, 20, etc I am trying to loop through them in a template, and I guess I’m a special kind of dense. Most recently I have tried $args =...

View Article
Browsing latest articles
Browse All 54 View Live