0
votes
1answer
21 views

Custom Same Page Search

I've added a custom form to one of my page templates. It submits to itself $_SERVER['REQUEST_URI'] in hopes I can grab the $_GET values and modify my query using pre_get_posts, but instead it goes to ...
1
vote
1answer
76 views

Limits, not all post are showen when querying for posts by view count

I'm having some difficulty getting a loop that gives me post by most viewed. I started by following this tutorial ...
1
vote
3answers
2k views

Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?

I have spent hours today on a maddening issue I was having with displaying a custom post type. Everything displayed beautifully, except the pagination simply would not work properly. I have a ...
1
vote
2answers
277 views

How do I find if a page has a template?

So I'm doing a query like this: $the_query = new WP_Query( array( 'meta_key' => 'homepage', 'meta_value' => 'yes', 'post_type' => 'page', 'orderby' => 'modified', 'posts_per_page' ...
1
vote
2answers
773 views

Query from a different database than the default

I'm making a layout for a wordpress page. The layout needs to connect to a second database (both databases are in the same domain). But the problem is, when i execute just the file it works. But ...
0
votes
1answer
324 views

How properly create a blog template for wordpress?

I imagined that it is pretty easy to do: just take everything what is in index.php. Add <?php /* Template Name: Blog */ ?> at the top and you all set, but in my case it is not working. I ...
2
votes
2answers
1k views

Next & Previous (Pagination in this case) Not Appearing

I am using a custom page template for my portfolio. The code is calling the correct number of posts per page but for some reason the pagination links won't show up :-S My query <?php $loop ...