Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter redski05

    (@redski05)

    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

    Thread Starter redski05

    (@redski05)

    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?

Viewing 2 replies - 1 through 2 (of 2 total)