Skip to main content

Unanswered Questions

1,903 questions with no upvoted or accepted answers
-1 votes
1 answer
114 views

Get images only from a certain post type

I implemented this code on my site and it works. enter link description here But it works only once, I mean then if added other posts the code does not work do not get images from the posts. Even ...
-1 votes
1 answer
927 views

Order & Orderby clause not working with custom query

I'm having an issue with the order of search results loaded via AJAX, it never matches the order of the same query on the search results page. The AJAX response WP_Query instance uses the following ...
-1 votes
1 answer
732 views

the_excerpt() not working in custom archive

I have made a custom archive template which I want to display all the latest posts. I have managed to get this to work when searching for categories using archive.php fine. However now I have ...
-1 votes
1 answer
8k views

Filter posts by category

How can I get posts from a specific category on a custom category page? The below code gets the posts from all categories but I can't find a way to filter according to a specific category. Can ...
-1 votes
1 answer
864 views

Order posts by custom column using pre_get_posts

Is it possible to sort posts by custom column in wp_posts table (in this case, 'fav_count' column) using pre_get_posts filter? If not, is there any other way to do this before the main query is run, ...
-1 votes
1 answer
83 views

Pagination is not working using WP_Query

I have coded for custom post type pagination but it doesn't work. Here is some code for it. <?php global $wpdb; $userid = get_current_user_id(); $userData = get_user_meta($userid , 'referat', true)...
-1 votes
2 answers
809 views

Limit the number of posts via wpquery

We suppose that a category has 1000 posts, we can use the following code to show 10 posts per page and the wp pagenavi would present 100 pages with links of above 1000 posts. <?php query_posts($...
-2 votes
1 answer
314 views

Searching Custom Posts content with JQuery

I am adapting the site's archive pages for CPT's to use a masonry layout and adding a live search to the archive page. I have a setup that is working. However I've just realized that my script will ...
-2 votes
1 answer
170 views

Get all user with both meta_value

I was wondering if there were any efficient way of fetching all user comparing two different meta_key. I am currently fetching all user compared to the first meta, then loop trough the user_id to ...
-2 votes
1 answer
976 views

How to show only text from post in WordPress

How do I retrieve just the text of a post in WordPress not including any pictures?
-2 votes
1 answer
232 views

Display biography post for today's birthday person

I am new in the WordPress Theme development, i am building a website using WordPress that is specially for biographies posts. I have one section called "Today's birthday", in this section i wanted to ...
-2 votes
1 answer
830 views

have_posts order by title descending

I have custom post type 'movies' listing which i want to order by title, descending. Currently it sorts by post id. The code is: <?php if( $movies->have_posts() ) : ...
-3 votes
1 answer
264 views

Hook to get the query result after listing posts

As the title says, I have a filter in the listing of a custom post type page, and I must export the results, I could make that, but now I need to get the filtered results. is there any way to ...

15 30 50 per page
1
123 124 125 126
127