Results 1 to 1 of 1

Thread: Google Structured Data and Micro Data

  1. #1
    Thread Starter
    Veteran demonlee's Avatar
    Join Date
    Mar 2011
    Location
    Antas, Spain
    Posts
    574
    Thanks
    6
    Thanked 51 Times in 46 Posts

    Google Structured Data and Micro Data

    With more and more importance of Structured Data in todays website, primarily led by schema.org and Google, I have spent a couple of hours today playing with it and this is my first success.

    The following code is for the Classipress Single Post (single.php) used for blogging. It contains the correct schema.org protocols for Author, Publisher, Article & Date/Time Modified.

    PHP Code:
    <div class="content">

        <div class="content_botbg">

            <div class="content_res">

                <div id="breadcrumb">

                    <?php if ( function_exists('cp_breadcrumb') ) cp_breadcrumb(); ?>

                </div>

                <div class="content_left">

                    <?php appthemes_before_blog_loop(); ?>

                    <?php if ( have_posts() ) : ?>

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

                            <?php appthemes_before_blog_post(); ?>

                            <?php appthemes_stats_update$post->ID ); //records the page hit ?>

                            <div class="shadowblock_out">

                                <div class="shadowblock">

                                    <div class="post">

                                        <?php appthemes_before_blog_post_title(); ?>
                                                                        <h1><a itemprop="url" href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>

                                        <?php appthemes_after_blog_post_title(); ?>

                                        <?php appthemes_before_blog_post_content(); ?>

                                        <?php if ( has_post_thumbnail() ) the_post_thumbnail'blog-thumbnail' ); ?>

                                    <span itemscope="" itemtype="http://schema.org/Article"><?php the_content(); ?>

                                    </div><!-- .post -->


    <div itemscope itemtype="http://schema.org/Article">
    Published by <span itemprop="publisher"><?php the_author_posts_link() ?></a> : <time itemprop="dateModified"><?php the_time('F jS, Y'?></time> at <?php echo get_the_time(''$post->ID); ?></p></span>
    </div>


                                </div><!-- .shadowblock -->

                            </div><!-- .shadowblock_out -->

                            <?php appthemes_after_blog_post(); ?>

                        <?php endwhile; ?>

                        <?php appthemes_after_blog_endwhile(); ?>

                    <?php else: ?>

                        <?php appthemes_blog_loop_else(); ?>

                    <?php endif; ?>

                    <div class="clr"></div>

                    <?php appthemes_after_blog_loop(); ?>

                    <div class="clr"></div>

                    <?php comments_template(); ?>

                </div><!-- .content_left -->

                <?php get_sidebar'blog' ); ?>

                <div class="clr"></div>

            </div><!-- .content_res -->

        </div><!-- .content_botbg -->

    </div><!-- .content -->
    If you back up your orginal page, replace it with this one and go to the google structured data test page http://www.google.com/webmasters/tools/richsnippets it will reveal all the structured data on the URL you supply.

    At the TOP of the results, you may find it states no PUBLISHER data found, but if you look at the bottom, it will be there, google just cannot find a link to a Google+ Page.

    As my experience grows with PHP and Structured Data, I might start playing with the content of the Adverts and see if I can have the same success. It takes a while due to the way Classipress Functions - Mods take note, this really needs to be done as a re-write of the code....
    Demon- I shoot People
    www.demonlee.com Photography Website
    www.seemeadvert.co.uk Classipress Website
    www.imdb.me.com/demonlee Film

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Jomark How to Fix: Missing Required Field Google Structured Data Testing Tool
    By gangadhar98 in forum Clipper General Discussion
    Replies: 7
    Last Post: November 8th, 2014, 01:02 PM
  2. Dimitris Rich snippets/ structured data for google.
    By sexd in forum Help Using Vantage (Legacy)
    Replies: 15
    Last Post: November 4th, 2014, 02:04 PM
  3. [SOLVED] Structured Data of category pages
    By tradeamillion in forum Help Using Vantage (Legacy)
    Replies: 4
    Last Post: September 15th, 2014, 01:29 PM
  4. Dimitris Structured Data Fields
    By ngarren83 in forum Help Using Vantage (Legacy)
    Replies: 1
    Last Post: March 9th, 2014, 12:27 PM
  5. How to get average Rating - Structured Data
    By crixx in forum Help Using Vantage (Legacy)
    Replies: 2
    Last Post: May 28th, 2013, 02:19 PM