One way I accomplish this is by using custom queries on the page. Essentially you create categories and posts for the extra areas of content that you are trying to manage, and then you run a separate query within the page to pull in the content.
Something like this:
<?php $test = new WP_Query(‘category_name=main&showposts=1’);
while ($test->have_posts()) : $test->the_post(); ?>
<div id=”title”>
<h2>“><?php the_title(); ?></h2>
</div>
<?php the_content(__(‘Read more’));?>
<?php endwhile;?>
Make sure to replace the category_name with your category name (actually its the category slug so make sure to double check that) and change the $test variable to whatever you need it to be throughout the query.
Good luck
I’m not quite sure I’m understanding this. Are you saying using “posts” as the different regions on a single page? Assigning different categories to the posts and only calling that specific category?
That’s pretty much it in a nutshell, yes. I suppose it all boils down to how much content you want to be able to add to these additional regions and how much flexibility you want. If it’s just short snippets of text, another option might be to add a number of widget-capable areas to a template. Either way, you’re likely to need at least 1 custom template -assuming you do mean a Pages and not a single post.
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Well, yeah. I’m making custom templates.
I’m using WordPress as a CMS, so I’ve created several different templates for several different page layouts. But the thing I’m trying to get around is having a templated page that has more than one “content” box.
So that I can have two different <div>’s, that are both pulling dynamic information that can be edited in the WordPress Admin panel, and that are styled differently.
So, when the page is generated, something like:
<div1 class=first>
Content 1
</div1>
<div2 class=second>
Content 2
</div2>
And then either in a CSS file, or in-line code on the page template:
.first {
background-color: black;
}
.second {
background-color: white;
}
Then ImagineDesignEx’s comment about creating multiple queries/Loops seem to be the thing.
So, it seems like the only way to accomplish this is through use of posts, and not actual “page” content.
The trick is populating the ‘content boxes’ you’ve created. If you want to create that content without writing a whole new ‘MySpecialPosts’ management page, you’ve basically got posts or pages. I think ‘posts’ are the best fit. You can use pages to do it, but a number WP core functions and plugins generate navigation links from the pages, so you’ve got that to deal with if you use pages.
There’s always Flutter to create custom write panels too if you’re up for it http://flutter.freshout.us/
Flutter looks interesting. It might be what I’m looking for, but I don’t know. I’ll have to dive into deeper and see.
Thanks for the link!
Thank you guys for all the helpful information. I decided the best/easiest way to accomplish the “multiple editable regions on a page” was with the posts category idea or something similar.
I created a new posts category called “Home Sub Sections.” And whenever I need to bring in that information on the home page, I used:
<?php query_posts('category_name=Home Sub Sections); ?>
or I will call that specific post number with:
<?php query_posts('p=61') ?>
So, now I have my multiple editable regions, and for my “News” page that uses the normal post timeline, I just removed all posts in the category “Home Sub Sections” from being queued into the timeline on that page with:
<?php query_posts('cat=-3'); ?>
Once again, thanks for all the help. And if anyone ever runs into this problem, the link below is also helpful with dealing with this:
http://codex.wordpress.org/Template_Tags/query_posts
I’ve now moved to using Magic Fields. The guys developing this plugin are awesome, and extremely helpful.
Their plugin allows you to create all kinds of Write Panels with custom fields. Just what I needed.
http://magicfields.org/