Skip to content

Commit

Permalink
Changed the type of Structured Data from Article to WebPage (bug #710)
Browse files Browse the repository at this point in the history
Also added support for WPHeader, WPFooter and SiteNavigationElement
  • Loading branch information
dengenxp committed Jan 8, 2017
1 parent 1d82093 commit b2ade45
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 50 deletions.
6 changes: 3 additions & 3 deletions public_html/layout/denim/archivestorytext.thtml
@@ -1,8 +1,8 @@
{# begin {templatelocation} #}

<article itemscope itemtype="http://schema.org/Article" class="storytext archivestorytext">
<article class="storytext archivestorytext">
<header>
<h2 itemprop="name" class="story_title">{story_title_link}</h2>
<h2 class="story_title" itemprop="headline">{story_title_link}</h2>

<div class="story_icon">
{!if email_icon}<a title="{lang_email_story}" href="{email_story_url}" class="uk-icon-hover uk-icon-envelope-o"></a>{!endif}
Expand All @@ -17,7 +17,7 @@
</ul>
</header>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{!if story_anchortag_and_image_no_align}
<span class="story_image">{story_anchortag_and_image_no_align}</span>
{!endif}
Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/denim/breadcrumbs.thtml
Expand Up @@ -7,17 +7,17 @@
{# end {templatelocation} #}

<!-- BEGIN breadcrumb -->
<ul{!if microdata} itemscope itemtype="http://schema.org/BreadcrumbList"{!endif} class="uk-breadcrumb">
<ul{!if microdata} itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList"{!endif} class="uk-breadcrumb">
{breadcrumb_items}
</ul>
<!-- END breadcrumb -->

<!-- BEGIN breadcrumb_item -->
<li{!if microdata} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{!endif}><a href="{url}"{!if microdata} itemprop="item"{!endif}><span{!if microdata} itemprop="name"{!endif}>{name}</span></a>
<li{!if microdata} itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"{!endif}><a href="{url}"{!if microdata} itemprop="item"{!endif}><span{!if microdata} itemprop="name"{!endif}>{name}</span></a>
{!if microdata}<meta itemprop="position" content="{count}"{xhtml}>{!endif}</li>
<!-- END breadcrumb_item -->

<!-- BEGIN breadcrumb_item_nolink -->
<li{!if microdata} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{!endif}><span{!if microdata} itemprop="name"{!endif}>{name}</span>
<li{!if microdata} itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"{!endif}><span{!if microdata} itemprop="name"{!endif}>{name}</span>
{!if microdata}<meta itemprop="position" content="{count}"{xhtml}>{!endif}</li>
<!-- END breadcrumb_item_nolink -->
6 changes: 3 additions & 3 deletions public_html/layout/denim/featuredstorytext.thtml
@@ -1,8 +1,8 @@
{# begin {templatelocation} #}

<article itemscope itemtype="http://schema.org/Article" class="storytext featuredstorytext">
<article class="storytext featuredstorytext">
<header>
<h2 itemprop="name" class="story_title">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>
<h2 class="story_title" itemprop="headline">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>

<div class="story_icon">
{!if email_icon}<a title="{lang_email_story}" href="{email_story_url}" class="uk-icon-hover uk-icon-envelope-o"></a>{!endif}
Expand All @@ -17,7 +17,7 @@
</ul>
</header>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{!if story_anchortag_and_image_no_align}
<span class="story_image">{story_anchortag_and_image_no_align}</span>
{!endif}
Expand Down
4 changes: 2 additions & 2 deletions public_html/layout/denim/footer.thtml
Expand Up @@ -11,9 +11,9 @@

<hr class="separator"{xhtml}>

<footer id="footer" role="contentinfo" class="clearfix">
<footer id="footer" role="contentinfo" class="clearfix" itemscope="itemscope" itemtype="http://schema.org/WPFooter">
<div id="footer-content">
<div id="copyright">{copyright_msg}</div>
<div id="copyright" itemprop="copyrightHolder" itemscope="itemscope" itemtype="http://schema.org/Organization"><span itemprop="name">{copyright_msg}</span></div>
<div id="trademark">{trademark_msg}</div>
<div id="powered_by">{powered_by}&nbsp;<a href="https://www.geeklog.net/">Geeklog</a></div>
<div id="execution_textandtime">{execution_textandtime}</div>
Expand Down
12 changes: 6 additions & 6 deletions public_html/layout/denim/header.thtml
Expand Up @@ -22,24 +22,24 @@
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>

<body dir="{direction}" class="{layout_columns}">
<body dir="{direction}" class="{layout_columns}" itemscope="itemscope" itemtype="http://schema.org/WebPage">
{# start {templatelocation} #}

<!-- #container { -->
<div id="container">
<header id="header" role="banner" class="brand-text">
<header id="header" role="banner" class="brand-text" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
<div id="header-content">
<a class="tm-toggle uk-navbar-toggle uk-visible-small" href="#offcanvas" data-uk-offcanvas="{mode:'reveal'}"></a>
<div class="nameplate">
<h1 class="site_name"><a href="{site_url}" title="{site_name}">{site_name}</a></h1>
<h1 class="site_name" itemprop="name"><a href="{site_url}" title="{site_name}" itemprop="url">{site_name}</a></h1>
<p class="site_slogan">{site_slogan}</p>
</div>
</div>
</header>

<hr class="separator"{xhtml}>

<nav id="navigation" role="navigation" class="uk-hidden-small">
<nav id="navigation" role="navigation" class="uk-hidden-small" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<div class="navigation_content uk-navbar uk-navbar-attached gl-navbar-small">
<ul id="navigation_ul" class="uk-navbar-nav">
{menu_elements}
Expand All @@ -60,7 +60,7 @@
</div>
</nav>

<div id="offcanvas" class="uk-offcanvas">
<div id="offcanvas" class="uk-offcanvas" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-offcanvas">
{menu_elements}
Expand All @@ -75,7 +75,7 @@

<!-- Center Block Container -->
<div id="centerblocks">
<main id="main-content" role="main">
<main id="main-content" role="main" itemscope="itemscope" itemprop="mainContentOfPage" itemtype="http://schema.org/WebPageElement">
<p class="welcome_msg">{welcome_msg}&nbsp;{datetime}</p>
{breadcrumb_trail}

4 changes: 2 additions & 2 deletions public_html/layout/denim/menunavigation.thtml
@@ -1,10 +1,10 @@
{# {templatelocation} - The Menu Navigation uses template blocks which is built into this file #}

<!-- BEGIN menuitem -->
<li class="menuitem"><a href="{menuitem_url}">{menuitem_text}</a></li>
<li class="menuitem" itemprop="name"><a href="{menuitem_url}" itemprop="url">{menuitem_text}</a></li>
<!-- END menuitem -->
<!-- BEGIN menuitem_last -->
<li class="menuitem last-child"><a href="{menuitem_url}">{menuitem_text}</a></li>
<li class="menuitem last-child" itemprop="name"><a href="{menuitem_url}" itemprop="url">{menuitem_text}</a></li>
<!-- END menuitem_last -->
<!-- BEGIN menuitem_none -->

Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/denim/storytext.thtml
@@ -1,8 +1,8 @@
{# begin {templatelocation} #}

<article itemscope itemtype="http://schema.org/Article" class="storytext">
<article class="storytext">
<header>
<h2 itemprop="name" class="story_title">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>
<h2 class="story_title" itemprop="headline">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>

<div class="story_icon">
{!if email_icon}<a title="{lang_email_story}" href="{email_story_url}" class="uk-icon-hover uk-icon-envelope-o"></a>{!endif}
Expand All @@ -17,7 +17,7 @@
</ul>
</header>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{!if story_anchortag_and_image_no_align}
<span class="story_image">{story_anchortag_and_image_no_align}</span>
{!endif}
Expand Down
2 changes: 1 addition & 1 deletion public_html/layout/denim/topicrelated.thtml
Expand Up @@ -5,7 +5,7 @@
{# end {templatelocation} #}

<!-- BEGIN topicitem -->
<a href="{topic_url}"><span itemprop="articleSection">{topic}</span></a>
<a href="{topic_url}">{topic}</a>
<!-- END topicitem -->
<!-- BEGIN separator -->
&nbsp;
Expand Down
4 changes: 2 additions & 2 deletions public_html/layout/denim_curve/footer.thtml
Expand Up @@ -11,9 +11,9 @@

<hr class="separator"{xhtml}>

<footer id="footer" role="contentinfo" class="clearfix">
<footer id="footer" role="contentinfo" class="clearfix" itemscope="itemscope" itemtype="http://schema.org/WPFooter">
<div id="footer-content">
<div id="copyright">{copyright_msg}</div>
<div id="copyright" itemprop="copyrightHolder" itemscope="itemscope" itemtype="http://schema.org/Organization"><span itemprop="name">{copyright_msg}</span></div>
<div id="trademark">{trademark_msg}</div>
<div id="powered_by">{powered_by}&nbsp;<a href="https://www.geeklog.net/">Geeklog</a></div>
<div id="execution_textandtime">{execution_textandtime}</div>
Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/modern_curve/archivestorytext.thtml
@@ -1,7 +1,7 @@
{# begin {templatelocation} #}

<div itemscope itemtype="http://schema.org/Article" class="archivestorytext">
<h2 itemprop="name" class="story_title">{story_title_link}</h2>
<div class="archivestorytext">
<h2 class="story_title" itemprop="headline">{story_title_link}</h2>

<ul class="icon">
<li>{email_icon}</li>
Expand Down Expand Up @@ -31,7 +31,7 @@

<div style="clear:both"></div>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{story_text_no_br}
</div>

Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/modern_curve/breadcrumbs.thtml
Expand Up @@ -3,13 +3,13 @@
{breadcrumbs}

<!-- BEGIN breadcrumb -->
<div {!if microdata} itemscope itemtype="http://schema.org/BreadcrumbList" {!endif}class="bc_navigation">
<div {!if microdata} itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList" {!endif}class="bc_navigation">
{breadcrumb_items}
</div>
<!-- END breadcrumb -->

<!-- BEGIN breadcrumb_item -->
<span{!if microdata} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{!endif}>
<span{!if microdata} itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"{!endif}>
{separator}
<a href="{url}"{!if microdata} itemprop="item"{!endif}>
<span{!if microdata} itemprop="name"{!endif}>{name}</span>
Expand All @@ -19,7 +19,7 @@
<!-- END breadcrumb_item -->

<!-- BEGIN breadcrumb_item_nolink -->
<span{!if microdata} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{!endif}>
<span{!if microdata} itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"{!endif}>
{separator}
<span{!if microdata} itemprop="name"{!endif}>{name}</span>
{!if microdata}<meta itemprop="position" content="{count}" />{!endif}
Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/modern_curve/featuredstorytext.thtml
@@ -1,7 +1,7 @@
{# begin {templatelocation} #}

<div itemscope itemtype="http://schema.org/Article" class="featuredstorytext">
<h2 itemprop="name" class="story_title">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>
<div class="featuredstorytext">
<h2 class="story_title" itemprop="headline">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>

<ul class="icon">
<li>{email_icon}</li>
Expand Down Expand Up @@ -31,7 +31,7 @@

<div style="clear:both"></div>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{story_text_no_br}
</div>

Expand Down
6 changes: 3 additions & 3 deletions public_html/layout/modern_curve/footer.thtml
Expand Up @@ -13,10 +13,10 @@
<hr class="separator"{xhtml}>

<!-- #footer { -->
<div id="footer">
<div id="footer" itemscope="itemscope" itemtype="http://schema.org/WPFooter">
<div id="footer-content">
<ul class="copyright">
<li class="copyright_notice"><address>{copyright_notice}</address></li>
<ul class="copyright" itemprop="copyrightHolder" itemscope="itemscope" itemtype="http://schema.org/Organization">
<li class="copyright_notice" itemprop="name"><address>{copyright_notice}</address></li>
</ul>
<ul class="site_info">
<li class="powered_by">{powered_by}&nbsp;<a href="https://www.geeklog.net/">Geeklog</a></li>
Expand Down
10 changes: 5 additions & 5 deletions public_html/layout/modern_curve/header.thtml
Expand Up @@ -10,15 +10,15 @@
{rel_links}
{plg_headercode}
</head>
<body dir="{direction}" class="{layout_columns}">
<body dir="{direction}" class="{layout_columns}" itemscope="itemscope" itemtype="http://schema.org/WebPage">
{# begin {templatelocation} #}

<!-- #container { -->
<div id="container">
<!-- #header { -->
<div id="header">
<div id="header" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
<div id="header-content">
<h1 class="site_name"><a href="{site_url}"><img src="{site_logo}" width="226" height="80" alt="{site_name}"{xhtml}></a></h1>
<h1 class="site_name" itemprop="name"><a href="{site_url}" itemprop="url"><img src="{site_logo}" width="226" height="80" alt="{site_name}"{xhtml}></a></h1>
<p class="site_slogan">{site_slogan}</p>
</div>
</div>
Expand All @@ -27,7 +27,7 @@
<hr class="separator"{xhtml}>

<!-- #navigation { -->
<div id="navigation">
<div id="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul>
{menu_elements}
</ul>
Expand All @@ -48,7 +48,7 @@
{# Center Block Container #}
<div id="centerblocks">
<p class="welcome_msg">{welcome_msg}&nbsp;{datetime}</p>
<div id="centerblocks-content">
<div id="centerblocks-content" itemscope="itemscope" itemprop="mainContentOfPage" itemtype="http://schema.org/WebPageElement">
{breadcrumb_trail}

{# end {templatelocation} #}
6 changes: 3 additions & 3 deletions public_html/layout/modern_curve/menunavigation.thtml
@@ -1,10 +1,10 @@
{# begin {templatelocation} - The Menu Navigation uses template blocks which is built into this file #}
{# {templatelocation} - The Menu Navigation uses template blocks which is built into this file #}

<!-- BEGIN menuitem -->
<li class="menuitem"><a href="{menuitem_url}">{menuitem_text}</a></li>
<li class="menuitem" itemprop="name"><a href="{menuitem_url}" itemprop="url">{menuitem_text}</a></li>
<!-- END menuitem -->
<!-- BEGIN menuitem_last -->
<li class="menuitem last-child"><a href="{menuitem_url}">{menuitem_text}</a></li>
<li class="menuitem last-child" itemprop="name"><a href="{menuitem_url}" itemprop="url">{menuitem_text}</a></li>
<!-- END menuitem_last -->
<!-- BEGIN menuitem_none -->

Expand Down
8 changes: 4 additions & 4 deletions public_html/layout/modern_curve/storytext.thtml
@@ -1,7 +1,7 @@
{# begin {templatelocation} #}

<div itemscope itemtype="http://schema.org/Article" class="storytext">
<h2 itemprop="name" class="story_title">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>
<div class="storytext">
<h2 class="story_title" itemprop="headline">{start_storylink_anchortag}{story_title}{end_storylink_anchortag}</h2>

<ul class="icon">
<li>{email_icon}</li>
Expand Down Expand Up @@ -31,7 +31,7 @@

<div style="clear:both"></div>

<div itemprop="articleBody" class="story_introtext">
<div class="story_introtext" itemprop="description">
{story_text_no_br}
</div>

Expand All @@ -42,7 +42,7 @@
{related_articles_by_keyword}
{!endif}

{!if navi_list}
{!if navi_list}
<ul class="navi">
{!if page_selector}<li>{page_selector}</li>{!endif}
{!if readmore_link}<li>{readmore_link}</li>{!endif}
Expand Down
2 changes: 1 addition & 1 deletion public_html/layout/modern_curve/topicrelated.thtml
Expand Up @@ -5,7 +5,7 @@
{# end {templatelocation} #}

<!-- BEGIN topicitem -->
<a href="{topic_url}"><span itemprop="articleSection">{topic}</span></a>
<a href="{topic_url}">{topic}</a>
<!-- END topicitem -->
<!-- BEGIN separator -->
&nbsp;
Expand Down

4 comments on commit b2ade45

@eSilverStrike
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why go from the article schema to a web page?

@dengenxp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geeklog's story is not equipped with Item:Image and Item:Publisher as standard. Therefore, it is not easy to correspond to Article Structured Data.

@eSilverStrike
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Publisher could be the Geeklog website owner name though I guess that may not always be the case.

With the images we do have the location of the image but nothing else (like title, caption, etc.). I have never really liked how Geeklog has handled images in stories. I have always used a customized image autotag I created which gives me much more control (like adding title, caption, lightbox if needed).

I guess this could become a feature request (for 2.2.0) if we truly want to switch the article schema from webpage back to article with all of the correct information.

@dengenxp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could become a feature request (for 2.2.0) if we truly want to switch the article schema from webpage back to article with all of the correct information.

I agree with your opinion.

Please sign in to comment.