Thats more than helpful. Thanks Owen. On Saturday, February 23, 2013 10:19:17 PM UTC+5, ringmaster wrote: > > On 2/23/2013 10:15 AM, Kamran wrote: > > > > I am trying to build a theme similar to omgubuntu > > <http://www.omgubuntu.co.uk/>. On the homepage an image is shown for > > every post either extracted from the post or another image. Each post > > also has a type like news, howto or editorial. So how would i add > > a separate image with a post to be used as a thumbnail and how to add > > the types. Should i add Content types or something else? > > I think the type of thing you're looking for is the theme I've built for > redalt.com: https://github.com/ringmaster/heavy > > This theme adds a field to every entry that can be assigned an image > from the media browser. That image can in turn be used by the theme > when an image is required. > > Assigning the tag "headline" to a post promotes it into the "headlines" > preset, which is displayed by a custom block that the theme provides. I > dropped that block into the top_content area of the theme (only in the > "Homepage" scope, so it only appears on the home page), and posts with > the "headline" tag appear in that area with the image. > > You should be able to extend this idea to do different types of posts, > like editorial, howto, or news. > > Also, you could instead do something like what we did for the > twentythirteen theme clone: > https://github.com/ringmaster/twentythirteen/blob/master/theme.php > > This theme isn't as well documented, but it has some interesting > component parts that might be useful for what you're building. The > useful parts are: > > * The get_action_form_publish_entry() method, which adds a list of > potential "formats" to the entry editing form. > * The filter_content_type() method, which augments the fallback template > list for any post by adding its saved format to the template name. > * The separate templates for each of the formats named > entry.{format}.php, each of which being used for its respective format > type. > > Using this system with some tweaks including an additional context > parameter -- within twetythirteen's home.php file, you'll see a call to > $theme->content($post), which you'd change to $theme->content($post, > 'context') -- you can gain access to templates like > entry.{format}.{context}.php, so that your headline area posts could use > a different template than your main content area posts. Just a thought. > > Hope that's helpful. > > Owen > >
-- -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-users --- You received this message because you are subscribed to the Google Groups "habari-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
