I would really appreciate a hand with the following:
-
I have a WordPress page that displays posts using
query_posts('cat=10&tag=parties&orderby=rand');
-
What I would like to do is split the list in half and insert text in the middle. Ideally the text would come from the WYSIWYG editor for the page in WordPress. I guess I need two sets of “php query posts” with the second query excluding posts from the first?
Is anyone able to help?
Many thanks!
Instead of using
query_posts
why don’t you use aWP_Query
? This will get you an array that you can query the size of, then you could then have a counter which increments and once it hits the halfway mark, you insert whatever you want and move on.Set it up like this:
Hope that works. It was a late old night of Christmas parties last night.