Grow your CSS skills. Land your dream job.

hNews Microformat

  • # May 21, 2013 at 12:00 am

    So I am still working on a starter theme that suits me. I came across the hNews Microformat of the “html5 reset” theme. I am using the loop as a template part that I can add where needed. My question is less of a php issue I guess, but more of a semantic issue.

    < ?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    id=”post-< ?php the_ID(); ?>“>

    < ?php the_title(); ?>

    < ?php the_content(); ?>

    < ?php wp_link_pages(array('before' => __(‘Pages: ‘), ‘next_or_number’ => ‘number’)); ?>

    < ?php the_tags( __('Tags: '), ', ', ''); ?>

    < ?php // posted_on(); ?>

    < ?php edit_post_link(__('Edit this entry'),'','.'); ?>

    < ?php comments_template(); ?>

    < ?php endwhile; endif; ?>

    If I use the article tag, is it okay to use this format to post pages also, or should I have another loop that will display the pages in a div rather than an article?

    # May 21, 2013 at 12:36 am

    Article tag is html5, has nothing to do with hNews, it should be used for all content in the correct hierarchy.

    # May 21, 2013 at 1:14 am

    Yes I know. But thanks. If I was unclear, I am asking if I should use the article tag to post the “page” post type into. If it is considered to be an article or not. I guess the title does make it seem unclear.

    “The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication.”

    Is the WC3 article standards. While it is self-contained in a page, it’s not ever something that would be distributable or reused.

    # May 21, 2013 at 1:56 am

    I would use the article tag for a post, yes. Just because something, in principle, could be “independently distributable or reusable” doesn’t mean it would. That said, RSS feeds are one way to reuse a post.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".