1
vote
2answers
110 views

Determine WP_Query parameters from URL

I'm wondering if it's possible to determine WP_Query parameters by only using the given page URL. The reason I'm trying to do this because I'm developing a SPA theme (and ultimately a JSON response) ...
0
votes
0answers
21 views

How to build new WP_Query using url

How to build a WP_Query using a url in wp_ajax_nopriv action. I have a following url for example: "http://example.com?paged=2 so I need to build a WP_Query which will retrieve a second page of posts. ...
0
votes
1answer
48 views

How to get list of posts from permalinks?

I am using an API which tracks metrics on parts of my site. The only useful bit it saves though is the URL (permalink). What is the most efficient way to query up all the posts that match those ...
0
votes
0answers
39 views

When WP_Query only returns 1 post, how do I automatically redirect to that post?

I've been searching around for a few hours now and can't figure out how to do this. Seems really simple. I've seen lots of redundant examples on how to redirect to a single post when a search result ...
0
votes
0answers
41 views

Issue with permalinks for custom post type

I have a little issue here... When i'm using default permalinks, everything works great, but when I set up %postname% permalink in settings, my template with custom post type is not loaded. ...
0
votes
0answers
130 views

Pagination for blog posts reloading same page

Symptoms Visiting /blog/ loads the first 10 posts, as expected. Visiting /blog/page/2/ (and onward) loads the new URL but with the same 10 posts. Nothing changes but the URL. Setup Details Custom ...
0
votes
1answer
39 views

Custom Taxonomy List links being re-written

I am trying to show a list of terms from my Job Category. I tried the following: function job_listing_taxonomy_list( $taxonomy,$hide ) { $args = array('order'=>'ASC','hide_empty'=>$hide); ...
0
votes
2answers
87 views

Make assigning post to a specific category equivalent to assigning it to all categories

Allow me to explain with an example, for the sake of clarity. Please take the time to read it all to get a good idea of what I am exactly after. On my WordPress site categories are used as Editions ...
0
votes
1answer
509 views

Default permalink structure causing Notice: Undefined property: WP_Query::$post

I use the wp for membership site. I use pages for the user log in, manage post, edit profile and etc. When I apply the default permalink structure, I found that the debug mode show this notice on ...
2
votes
2answers
108 views

Multiple instances of Featured Image Query

I have some custom code built into the header of my theme that gets the featured image from a post, displays the image and links to the posts permalink when clicked on by a user. The problem I am ...
1
vote
0answers
71 views

WP_Query Attachment adds additional attachment count and need to link attachment to post url

I just wonder why WP_Query adding one more additional attachment with the defined number or posts. Also need to link attachment (thumbnail) to the post url. Here is my code <?php $query = new ...
2
votes
1answer
4k views

Why is “/page/2/” not working?

Finally got pagination to work with the below code, but now the pagination links to /videos/page/2/, which doesn't exist. How do I get page 2 to work? <?php $temp = $wp_query; $wp_query= null; ...
4
votes
1answer
584 views

Why does `get_permalink()` produces an add. DB request without $post->filter?

I'm currently working on a custom loop/query where I need to add the permalink of a post to the array of posts I'm retrieving from the DB. Sadly get_permalink() produces one additional DB request ...
0
votes
1answer
92 views

Why doesn't my page know it's a page (won't return true for is_page())?

I have a page with the slug blog. Mysite.com/blog correctly renders from the template file page-blog.php. However, it does not execute footer code from my theme that's conditioned on is_page('blog'), ...
7
votes
1answer
11k views

Passing and retrieving query vars in wordpress

I have two authors pages, one displays about 5 posts. Then I'm trying to setup another page that will be all of their posts. I have created a template called moreauthorposts.php and I'm trying to ...
0
votes
2answers
2k views

Query custom taxonomy by term id?

I made a custom post type and a custom taxonomy, but I have a problem. When I access the url http://www.ithemes.co.kr/?shopcat=galaxy-s, it works well. But when I access the url ...