Excerpts not showing on main page

This should output the text at the bottom of each ‘single’ post add_filter( ‘the_content’, ‘my_the_content_filter’, 0 ); function my_the_content_filter( $content ) { if ( is_single() ) { global $post; $content .= “<p>here will be some data retrieved from the database, it will be beneath every post. I like it!</p>”; } return $content; } you could … Read more

query all posts published by certain user id

You are querying for post author with ID 8 and also you are telling to match the post type to property post type and also post_status to be either publish, acf-disabled, private. Check your post that didn’t be return for the above and will found the reason. SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND … Read more

Filter loop by ‘price’ with meta_query

Ok, found the problem. I had to add ‘type’ => ‘numeric’, to my query. So the final code looks like: $adsAll = array( ‘post_type’ => $postType, ‘meta_key’ => $metaKey, ‘orderby’ => $orderBy, ‘order’ => $order, ‘posts_per_page’ => $PostsPerPage, ‘meta_query’ => array( array( ‘key’ => ‘preco_anuncio’, ‘value’ => array(‘8700′,’500000’), ‘compare’ => ‘between’, ‘type’ => ‘numeric’, ), … Read more

get_permalink() of page the enclosing page not posts

I think you need the get_post_type_archive_link function. It requires a post type as a parameter, but since you’re already on the archive page you should be able to use it in combination with get_post_type, which gets the current post type by default: $permalink = get_post_type_archive_link( get_post_type() ); See more on the Codex.

Double loop output

By inspecting your code, it appears those are two separate featured posts, rather than a single one with the author being duplicated. The first one being: Is Marketing Operations The New Industry Buzzword? And the second one being: Why The CMO Is The CEO’s Super-Weapon This might be trivial – but have you double checked … Read more