I am in the process of installing Schema on my friends website. I'm adding ServiceType to his House Clearance page, as well as all his other services that he provides to the local area of Bournemouth using
areaServed > GeoShape > circle, which is still in development.
Since the website is powered by WordPress the code within the loop looks like this:
<?php ?> <?php while (have_posts()) : the_post(); ?> <article id="post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Service"> <?php the_title( '<h1>', '</h1>' ); ?> <?php the_content(); ?> </article> <?php endwhile; ?> <?php get_footer(); ?>
If your not familiar with WordPress
id="post-<?php the_ID(); ?>" appends the unique page id to the element. As you can see from the code above both the
itemscope itemtype="http://schema.org/Service"are attached to the element container
Using Google's Rich Snippet Testing Tool I get the following results:
As you can see @id is taking the ID from the element and appending it to the path of the page without a HASHTAG, meaning that URL doesn't actually exist and returns a 404 status.
- What is the purpose of Schema @id?
- Does it matter if that URL is accessible or not?
- Should I rename
id="post-<?php the_ID(); ?>"to
class="post-<?php the_ID(); ?>"or add a new line with serviceType?