I’m making a website for a composer who wants to have separate pages for several different kinds of posts: a news page, a video clips page, a page for reviews he’s gotten, a blog page for more at length writing, upcoming events, etc. He wants to include these in the main navigation, some of them as sub menus, alongside other static pages like his bio. The site is still very much in development, but just to see the structure I’m talking about, you can go check it out: http://noamfaingold.com/wordpress (oh christ, I can’t use HTML? of all the places to use BBCode…). My current plan is to go through and have custom page templates for each page that has a separate query_posts and loop for the different types of content. Obviously, this functionality is already in place with categories, but I don’t know if it’s possible to include category pages in the same navigation list as static pages without just hard coding it in. If there is some way to do this, let me know, it’ll save me a bit of time.
In an entirely separate question, when I watch Chris’s screencasts, it looks like Coda automatically uploads changed files (perhaps when he saves them?) and then gives him a little pop up to tell him it’s done. I use Coda, but it doesn’t seem to do these things out of the box. Is there a plugin I haven’t found yet that will do this? Seems like it would definitely speed up workflow by about 2/3 of a second every time I want to upload and then check it out in the browser, which would totally be worth it.
If you make separate page templates for each page, as is your goal. You’ll want to make separate pages in the WordPress Admin.
Once that is done you could use WP_list_pages() to create the navigation. Then on each page template you could run the query_posts to filter the page to show only the posts you want by category using the following
Where the "3" is the category id (you can find category id by navigating to "Categories" in the WP Admin, and mouse over the "Edit" link for the category you want. The status bar at the bottom of your browser will show the link and end in &CAT_ID=3 or whatever that categorie’s id is.)
As for coda, if you are altering the files in "Remote" instead of "local" In the left column. You will be working directly on your server. so a save will automatically upload.
as for posting html or any code here, you can click the code button and it will wrap your html in the proper "code" tags, and will display as in the above query posts example..
Thanks blue642, that’s exactly what I was planning on doing. The problem is that this requires hard-coding each page with a different query_posts. It would be nice if I could just ask wordpress to output some of the category pages (like what I would get from wp_list_categories) into the same lists and sublists that wp_list_pages produces, instead of having to have a separate page template for each. Wouldn’t it be better if this could be done dynamically? The whole point of a CMS is that I don’t have to write new code for every page, right?
As for the comment about not being able to use HTML, I should clarify that what happened was I wanted to give a link to the site, so I typed something like
only to find while previewing it that css-tricks, of all places, won’t read html tags in its posts, but instead requires that BBCode thing if you actually want to add tags to your posts, rather than just giving a code example. I’m sure it has to do with security and all that, but still…
Editing remotely with Coda does upload as soon as I save, but it doesn’t give me that cool pop up I was talking about.
You must be logged in to reply to this topic.