Linked Questions

1
vote
1answer
19 views

How to query_post custom posts within default taxonomy?

I'm trying to query_post custom posts. It works very good with custom taxonomy, but not with default "category" taxonomy. I tried using "category_name" and "tax_query", but it doesn't work for me. ...
-2
votes
0answers
16 views

What are Differnce Between [closed]

I know Below Question Might be asked many time or having many answer in Google. But i dare to ask below Question as it WordPress most helpful website. 1 } Filter and Action 2 } apply_filters , ...
0
votes
1answer
30 views

Else statement not triggering after a failed if statement

I am working on a client site and the statement I wrote 6 months ago seems to have stopped working after the WordPress update to 3.8 I can't see or figure out why. There are no errors appearing it ...
1
vote
2answers
34 views

Different Ways to Query Custom Post Types?

I'm using this code to use custom post types like regular post: add_action( 'pre_get_posts', 'add_my_post_types_to_query' ); function add_my_post_types_to_query( $query ) { if ( is_home() && ...
0
votes
0answers
21 views

Secondary loop cuts off at 10 posts?

I have a loop to get a tag name from the URL slug, and then show all the posts, grouped by category, that matched that tag. It works, but I recently noticed it only shows 10 posts despite my setting ...
0
votes
1answer
35 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
1answer
23 views

Executing query_posts after wp_insert_post

am working on a custom plugin. I'm programmatically adding a new post in the plugin use wp_insert_post. Works fine, the post gets added and I get the $post_id. However, if I immediately run ...
0
votes
0answers
23 views

Global post is always custom post type last post

my global $post is always taking the object of my custom post type "advertisement". So when i'm editing e.g. "Hello world" which post id is 1, it shows me post id of the last advertisement post. If ...
0
votes
1answer
24 views

How can I create a custom shortcode that will return a custom post type by ID?

Please excuse my ignorance, this seems simple but I can't figure it out and I've been rushing to hack things together. I can't find anything online to help me out. What I have: A custom post type ...
0
votes
1answer
19 views

Getting posts from multiple users?

Using a third party plugin that allows users to follow each other, we can retrieve the users being followed like so (commented):- <?php if (have_posts()) : ?> <?php global ...
0
votes
1answer
95 views

how to get posts by custom post type then display Custom fields?

I have custom posts types for Recipes, and within that I have set up Advanced Custom Fields (from the plugin.) Within, that custom post type, I have several categories. Two questions: 1.) How do I ...
0
votes
2answers
61 views

How to display a number of posts based on a Advanced Custom Field (ACF)

I have the following code working fine in my theme: <!-- Modify query object --> <?php query_posts('showposts=5&post_type=news'); ?> <!-- Start the Loop --> <?php if ( ...
0
votes
1answer
41 views

How to include custom post type posts on a page?

I need help adding a Portfolio page to one of my main Pages. I don't know what information is needed, so I'll just throw in some of the important stuff. Basically I have my main menu, (Welcome, ...
0
votes
0answers
10 views

Display last posts with comments link on static page

I want to create a static page which will be almost the same as the default one with latest posts. I know I can use query_posts( 'posts_per_page=5' ) to display my last five posts, but the comment ...
-1
votes
1answer
14 views

repeating posts on 2nd page to posts

I am having an issue where I wanted to strip out all categories but one from the homepage so I added the following to the loop: query_posts('cat=2'); However now the issue is that page one of the ...

15 30 50 per page