Jump to content

Custom post types & rss feed


lucas
 Share

Recommended Posts

Hello everyone,

I'm designing a website for a musician and was wondering if it's possible to create something like this with PW: http://cherylcole.com

As you can see, the "news" are basically a set of custom post types: articles, video, gallery... Would be too complicated to achieve this with PW?

And is it possible to create multiple rss feeds for each section of the site? (articles feed, gallery feed, etc)

Any help will be *highly* appreciated! ;)

Cheers

Link to comment
Share on other sites

It's certainly possible, you just have to create a page in the root for each of those, and the article as children of them

home

-articles (template articles)

--article 1 (template article)

--article 2 (template article)

--article 3 (template article)

--...

-music (template music)

--song 1 (template song)

--song 2 (template song)

--song 3 (template song)

--...

-video (template videos)

--video 1 (template video)

--video 2 (template video)

--video 3 (template video)

--...

-...

Then, in each template do this, adapting with the relevant info for each one

foreach($page->children as $c){
   echo $c->title;
}

for the feeds you can use the RSS Feed Generator module http://modules.proce...les/markup-rss/ and use it like this:

create a page for each feed with it's own template, then do for each one

$rss = $modules->get("MarkupRSS");
$rss->title = "Articles";
$rss->description = "All the articles";
$items = $pages->find("/articles/")->children;
$rss->render($items);

Do the same for the others. Read the module instructions for some configuration options.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...