i found a solution to my problem!
function custom_author_archive( &$query ) {
if ($query->is_author)
$query->set( 'post_type', 'idea' );
}
add_action( 'pre_get_posts', 'custom_author_archive' );
Related Posts:
- Using ajax with paging and a custom sub-query
- Help to condense/optimize some working code
- Problem with ‘post__not_in’
- Sort X categories by last update and show image
- using post__in allow duplicate post id
- Pagination on archive.php page
- Having trouble generating pagination links on custom query
- Using dynamic conditions in ‘posts_where’ filter
- How to limit search to first letter of title?
- query_posts and pagination, still stuck after much research
- how could I get the pagination as I want to when query posts using get_posts function
- Counter code for paginated category pages in wordpress
- WordPress Search Filter Only for Page with Child of Child of Child of Child of Child
- How to modify the query to exclude posts by slug?
- How do i paginate query_posts with numeric pagination?
- Pagination on custom query
- Adding Variables to post query
- Custom posts per page does not work with pagination
- Tricky WP Query
- WordPress pagination showing same posts on each page
- query_posts() ALWAYS displays something?
- WordPress pagination with get_posts?
- Custom loops, sticky posts, and pagination nightmare
- Querying posts only if the current page is not paged?
- Each post is showing twice in my custom query…?
- Exclude posts by post meta value
- query_posts pagination will always show identical content
- Can’t get pagination to work for sticky posts only
- How do I use pagination in WordPress?
- Can I use WP_Query one time and then filter the results multiple times
- Pagination linking to first page
- Different layout based on post amount?
- How to solve this without flushing the rewrite rules for each post query the visitor triggers?
- How to check a list or feed of all posts under a category and tag?
- Best Query for blog posts
- Modify main loop query for paged and meta key
- Query Post interferes with Pagination
- Post Filter clearing on pagination $_post
- get_next_posts_link() stops displaying at page 4
- Adding Category Argument into an Array for WordPress Query
- Query posts in a category and include only one post per author?
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- Achieving pagination with `query_posts`
- Display/query post formats
- How to query post by user role?
- query_posts() in function makes global $wp_query out of sync?
- WordPress Custom Query
- How to order posts by modified date without using ‘query_posts’?
- Help altering a query to exclude all but standard post format
- get_post_meta causes database queries
- Why is that gdsr_sort=thumbs (GD start rating plugin) only works with query_posts and not with WP_Query?
- Query_posts $query_string
- How to order posts by slug using query_posts/ Wp_query
- Order by meta_key with two meta_queries
- Search stores (custom postcode field) within 5, 10, 15 miles of user inputted postcode.. Code modification
- Next & Previous (Pagination in this case) Not Appearing
- How to show only today’s post?
- use query_posts to return a post OR a page by ID
- ACF Custom Field WP_Query, but need to get all posts, if field doesn’t exist
- orderby:date not working
- Order query by post meta value
- Placing post data (title, date, and excerpt) nested in static content
- Single meta key with multiple meta value in like comparison
- list child page items (1 level with meta keys)
- Sorting a query Field by date
- Trying to package posts for republishing by partner offsite
- Exclude some authors from query
- number of posts per page + random + exclude categories
- How to Query Post
- query_post and wpdb returning different results
- Exclude current sticky post
- WordPress Custom Query to get Most Commented Posts in the Past 7 Days
- How to get category/tag in URL for Pagination links?
- Should I reset $wp_query?
- Break up posts per page in two sections
- Pagination issue with tag.php
- Query posts only with actual text content (not including shortcode or images)
- WP MS: How to query over the network
- I am officially missing something about transient posts
- Restrict query_posts by Date?
- Sort post by custom field numeric value
- Notting but the latest post content keeps on being loaded
- Can I paginate this get_attachment query?
- query_posts doesnt show pages with given ID when post_type => page
- How to put posts in pages using query posts
- Query add html after set amount of posts?
- How to setup blog page to render blog posts minus afew categories
- How to get max value of filtered query post
- Ordering of posts, 2020 Year showing as next event when should be last
- Following/Followers Users list Using Ajax Pagination inside Author Profile
- How to fix pagination for custom loops?
- pagination for a custom query
- How to display most popular post by views count in WordPress?
- show latest authors blog post
- Pagination in custom loop for custom post type throwing 404 error
- pagination does not work with query_posts. Help! [duplicate]
- query multiple posts by id using a string parameter, not array()
- Does wp_query and query_posts affect website performance? [duplicate]
- paged query leads to 404? [duplicate]
- Search results stuck on page 1