mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 12:36:23 +05:30
Use schema.org for breadcrumb
Cleaning up the breadcrumb
This commit is contained in:
parent
e47d7cec97
commit
c8552f3c37
2 changed files with 19 additions and 19 deletions
|
|
@ -268,13 +268,13 @@ function get_posts($posts, $page = 1, $perpage = 0)
|
|||
if($str[count($str) - 3] == 'uncategorized') {
|
||||
$category = default_category();
|
||||
$post->category = '<a href="' . $category->url . '">' . $category->title . '</a>';
|
||||
$post->categoryb = '<a property="v:title" rel="v:url" href="' . $category->url . '">' . $category->title . '</a>';
|
||||
$post->categoryb = '<a itemprop="item" href="' . $category->url . '"><span itemprop="name">' . $category->title . '</span></a>';
|
||||
} else {
|
||||
|
||||
foreach ($catC as $k => $v) {
|
||||
if ($v['0'] === $str[count($str) - 3]) {
|
||||
$post->category = '<a href="' . site_url() . 'category/' . $v['0'] . '">' . $v['1'] . '</a>';
|
||||
$post->categoryb = '<a property="v:title" rel="v:url" href="' . site_url() . 'category/' . $v['0'] . '">' . $v['1'] . '</a>';
|
||||
$post->categoryb = '<a itemprop="item" href="' . site_url() . 'category/' . $v['0'] . '"><span itemprop="name">' . $v['1'] . '</span></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
|
|||
|
||||
foreach ($tag as $a) {
|
||||
$url[] = '<a rel="tag" href="' . $a[1] . '">' . $a[0] . '</a>';
|
||||
$bc[] = '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . $a[1] . '">' . $a[0] . '</a></span>';
|
||||
$bc[] = '<span><a href="' . $a[1] . '">' . $a[0] . '</a></span>';
|
||||
}
|
||||
|
||||
$post->tag = implode(' ', $url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue