New install 5.4.1 - Site name is not updated in default template
Permalink
I just set up a site using the default template and content. I made an error with the site name and then tried correcting it in the site-wide settings > site name section.
If I change the site name the change appears in the browser meta title but the title on the template does not change.
If I then clear the cache, the site name text field is cleared. I then try typing in the correct site name and click "Save Site Name" but again the site name in the template does not change.
The default template is bringing in the title like this:
Any ideas on how to fix this.
Thanks
If I change the site name the change appears in the browser meta title but the title on the template does not change.
If I then clear the cache, the site name text field is cleared. I then try typing in the correct site name and click "Save Site Name" but again the site name in the template does not change.
The default template is bringing in the title like this:
$block = Block::getByName('My_Site_Name'); if( $block && $block->bID ) $block->display(); else echo SITE;
Any ideas on how to fix this.
Thanks
shouldn't it be ? it looks like youre missing the h1, a, and php tags.
(I think the OP was just copying the relevant parts out of the middle, rather than the whole thing. If the php tags were actually missing, it just wouldn't work at all.)
Silly question, but have you tried clearing the cache? In the Dasboard, under Sitewide Settings, scroll down to the Speed Settings and try the Clear Cache button.
That might not be the issue, but it's the first thing to try.
Silly question, but have you tried clearing the cache? In the Dasboard, under Sitewide Settings, scroll down to the Speed Settings and try the Clear Cache button.
That might not be the issue, but it's the first thing to try.
Yes as suspected I just copied some code from the default template as an example of how it is brought in. It probably confused the issue.
Again as you suspected I have tried clearing the cache, but this has not helped.
For some reason,the site name changes in the meta-title but not in the site title that appears in the mast-head.
I am in the process of creating a customised template which was going to use the site name and was wondering if anyone has any ideas on what could be causing it.
I feel it may be a bug in the new version, as I have never seen it before.
Thanks
Again as you suspected I have tried clearing the cache, but this has not helped.
For some reason,the site name changes in the meta-title but not in the site title that appears in the mast-head.
I am in the process of creating a customised template which was going to use the site name and was wondering if anyone has any ideas on what could be causing it.
I feel it may be a bug in the new version, as I have never seen it before.
Thanks
The themes I am using are Plain Yogurt and Dark Chocolate.
Thanks
Thanks
what happens if you delete it and create a new block? delete My_Site_Name add new content, call it My_Site_Name1, and then edit that. for the code use
That works.
I added your code directly to dafault.php of the core template and it shows teh correct name.
The main title block that appears beside the menu on the green salad template still shows the incorrect name.
So why would one work and the other not work when they are calling the same data?
Thanks for your help.
I added your code directly to dafault.php of the core template and it shows teh correct name.
The main title block that appears beside the menu on the green salad template still shows the incorrect name.
So why would one work and the other not work when they are calling the same data?
Thanks for your help.
because they arent calling the same data. the code I gave you linked to a block called my_site_name1 and green salad is still calling for my_site_name, which is the incorrect block.
Thanks that solves my issue and I can move forward with the template I need to create.
It does look like a bug in the new version considering it is a clean install using the default template without any changes.
Thanks again.
It does look like a bug in the new version considering it is a clean install using the default template without any changes.
Thanks again.