How to have a Wordpress blog inside a Pods site?

0

I've built a website for a client using Pods, and now I need to add to the site Wordpress' blog functionality. I'm finding that the Wordpress loop, as given out of the box, no longer works (have_posts() always returns false, even though I've created a post using the standard UI).

How is this usually accomplished? Can I still use Wordpress' out-of-the-box blogging/posts with Pods or do I need to create my own Pods structure for a blog?

Thanks in advance to all who reply.

asked Aug 2 '10 at 8:39

cstump

1

edited Aug 5 '10 at 6:04

add comment
enter at least 15 characters

3 Answers

1

Yes, Pods and blog shouldn't conflict at all (they work fine on my site). Are you sure your query isn't modified?

answered Aug 3 '10 at 11:29

Fike

208

what do you mean "query isn't modified"? – cstump Aug 5 '10 at 2:53
You can access the search query with $wpdb or query_posts(), thus displaying something different from typical posts (pages and attachments are stored in the same database; also you can, for example, exclude or include posts with custom fields, specific date etc etc). This process (if it exists) runs in theme files, so you can check this just by switching to default theme and see if something has appeared on the blog page. – Fike Aug 5 '10 at 5:41
add comment
enter at least 15 characters
0

Wordpress works as usual. You might want to check your loop and make sure your code is right. There should be no extra setup to get the blog working.

answered Aug 3 '10 at 4:14

wesbos

56

add comment
enter at least 15 characters
0

Thanks guys. Issue resolved. My problem was that I didn't fully understand the Wordpress Loop and how it can be modified by a query. My loop was under /blog, not /, in which case WP, by default, will look for a post with the permalink '/blog' (and when it finds nothing it shows nothing -- which was this thread's issue). By using query\_posts('posts\_per\_page=5'); before the loop on my /blog page I can now get the post listing I want.

answered Aug 6 '10 at 6:23

cstump

1

add comment
enter at least 15 characters