From 7ae3925bc528fbfb43040445480ab3a61e72551d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 7 Jan 2016 16:39:52 +0100 Subject: [PATCH] fix permalinks & title outside of loop --- controller/init.php | 2 +- header.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/init.php b/controller/init.php index 22da5af..62bb62c 100644 --- a/controller/init.php +++ b/controller/init.php @@ -12,7 +12,7 @@ $description = ''; $image = ''; $title = ''; $url = get_bloginfo('wpurl'); -$permalink = esc_url( get_permalink(get_queried_object()->ID) ); +$permalink = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $twitter = '@ascribeio'; if ( has_post_thumbnail() ) { diff --git a/header.php b/header.php index 417b1bb..b937a00 100644 --- a/header.php +++ b/header.php @@ -15,6 +15,9 @@ if (!isset($headColour)) { if (is_home()) { $title = "Blog | ascribe"; } +if ( is_category() || is_tag() ) { + $title = single_term_title( '', false ) . '| Blog | ascribe'; +} ?>