redski05
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Find text in URL and change text and header image accordingly.Found half an answer myself.
Still unsure about security though.
and still working on the header image being dynamic with the weaver extreme theme.note: northside.com and sunshine.com are fictional and used as example only.
//[companyname]
function whichname(){
$domain_name = $_SERVER[‘SERVER_NAME’];
//return $domain_name;
if( $domain_name == ‘northsidee.com’)
return ‘ Northside comany name’;
elseif($domain_name == ‘sunshine.com’)
return ‘Sunshine company name’;
else
return ‘not found’;//if not sunshin or northside return this string.
}add_shortcode(‘companyname’,’whichname’);
The above placed in functions.php of the theme in use.
in the actual page/post use the short code
[companyname]which will display the correct business name according to the domain url.
The other half of my question not yet resolved:
Now how to change the header image in a similar way.
Will post result when I figure it out – takes me time but I do get there eventually.Redski
Forum: Fixing WordPress
In reply to: Find text in URL and change text and header image accordingly.Easier said that done, do not know js well and get lost on sytax problems that take me hours to sort out.
Have you got an example?