thetmyster
Member
Posted 2 years ago #
Hi all, I Have a Blog and i want to have a Freebies page, but i want to be able to post into a page ive googled and found : http://wordpress.org/support/topic/241644?replies=8
but i do not understand how to do this can somone give me a guide on how to do this with the templates? So i can post to a page.
Thanks, T
You could apply code such as suggested here.
http://wordpress.org/support/topic/276775?replies=6
Of course just modify the WP_Query part to query the posts you want, and add HTML etc...
For example : WP_Query('cat=4'); would grab the posts from category with the ID 4.
Required info is all there, just modify the areas as required...
thetmyster
Member
Posted 2 years ago #
Part 2 the code is expried :P
Can you re-post?
and i do want to pull from a category, but can i hide it so the freebies are only in the freebies page?
Sorry, could have sworn i selected a month when creating the pastebin...
Here's the code again though, however you will need to add to it (HTML/CSS) and modify as required.
http://wordpress.pastebin.com/m6c979886
It was written for the guy in the other thread, but the same rules apply in any case... :)
thetmyster
Member
Posted 2 years ago #
ok, now i cant get the option for custom template
thetmyster
Member
Posted 2 years ago #
ok i got the template but how do i defien the post category
Just go and create a post as you usually would (under "Posts" and "Add new")..
All you need to do with the template is create a page, any name (no content in the actual page required), attach the template (from the right), save then go about adding posts, in the normal manner..
The page template is basically acting as a framework to grab a select group of posts...
thetmyster
Member
Posted 2 years ago #
But how do I select the gruop to pull?
thetmyster
Member
Posted 2 years ago #
so for the freebies on my site, maxTuts.co.cc
in catogory free WP_Query(category/free);
for my category free
would pul from http://maxtuts.co.cc/category/free ?
Read the links i provided...
A valid example was given.
WP_Query(category/free); Would not work, it's invalid...