Skip to content

Commit

Permalink
set post title in layout
Browse files Browse the repository at this point in the history
  • Loading branch information
cornernote committed Feb 24, 2014
1 parent 03a9a28 commit 2f595d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/YiiEmbed.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public static function runController()
$posts = $wp_query->query(array('pagename' => 'yii'));
$post = $posts[0];
$post->post_content = $content;
$post->post_title = Yii::app()->controller->pageTitle;
// callback to set the title
add_filter('wp_title', 'YiiEmbed::pageTitle');
// controller ran, not a 404
Expand Down

0 comments on commit 2f595d6

Please sign in to comment.