[wp-trac] [WordPress Trac] #12258: Bug: Wrong blog title
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 17 09:58:28 UTC 2010
#12258: Bug: Wrong blog title
-----------------------------------------+----------------------------------
Reporter: _DorsVenabili | Owner:
Type: defect (bug) | Status: reopened
Priority: high | Milestone:
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: theme custom header kubrick |
-----------------------------------------+----------------------------------
Changes (by _DorsVenabili):
* status: closed => reopened
* resolution: invalid =>
Comment:
I'm sorry nacin, but I wrote the solution for the buddypress theme first,
but the second solution is right for the wordpress theme, If not, it will
show the default blog's name at every blog's header, and that is a WP bug.
So it has to be changed in the file:
/wp-content/themes/default/header.php
Line 41:
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name');
?></a></h1>
And we add the next function in functions.php
function blog_name($blogid){
global $wpdb;
$blogname = $wpdb->get_var("SELECT meta_value FROM
wp_bp_user_blogs_blogmeta WHERE blog_id='".$blogid."' AND
meta_key='name'");
return $blogname;
}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12258#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list