Skip to content

Commit

Permalink
Merge pull request #25 from artlung/supportForTagPages
Browse files Browse the repository at this point in the history
Adding support for Tag Archive Pages
  • Loading branch information
artlung committed Apr 18, 2019
2 parents 88e1ebd + bd1a78d commit f2620b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion open-graph-protocol-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ function opengraphprotocoltools_set_data() {
$meta_tags = array_merge($meta_tags,opengraphprotocoltools_image());
$meta_tags = array_merge($meta_tags,opengraphprotocoltools_audio());
$meta_tags = array_merge($meta_tags,opengraphprotocoltools_video());

elseif (is_archive() && is_tag()):
$the_tag = single_tag_title('', false);
$meta_tags['http://ogp.me/ns#title'] = get_bloginfo('name') . ": tag: " . $the_tag;
// $meta_tags['http://ogp.me/ns#url'] = "";
$meta_tags['http://ogp.me/ns#description'] = get_bloginfo('name') . " posts tagged with " . $the_tag;
$meta_tags['twitter:creator'] = get_opengraphprotocoltools_author_twitter();
else:
$meta_tags['http://ogp.me/ns#title'] = get_bloginfo('name');
$meta_tags['http://ogp.me/ns#url'] = get_bloginfo('url');
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://joecrawford.com/plugin-donation
Tags: metadata, opengraphprotocol, facebook
Requires at least: 2.9
Tested up to: 5.0
Stable tag: 1.8
Stable tag: 1.9

Adds Open Graph Protocol meta to the individual pages and posts of your WordPress Install.

Expand Down Expand Up @@ -70,3 +70,7 @@ None.
= 1.8 =

* WordPress 5 compatibility check!

= 1.9 =

* Support for tag archive pages

0 comments on commit f2620b6

Please sign in to comment.