Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta title and meta description not updated when working with subdomains #47

Open
conejoninja opened this issue Aug 14, 2013 · 0 comments
Assignees

Comments

@conejoninja
Copy link
Member

When you choose subdomains as regions, the meta title and description still display the main home page meta tags. Not SEO friendly at all.

Original issue : osclass/Osclass#890

Proposed solution :

    <?php if(Params::getParam('subdomain')==1) { ?>
        <title><?php echo osc_user_name(); ?> - <?php osc_subdomain_host(); ?></title>
        <meta name="title" content="Toko online - <?php echo osc_user_name(); ?> - <?php osc_subdomain_host(); ?>" />
        <meta name="description" content="<?php echo osc_user_info(); ?>"/>

    <?php } else if (Params::getParam('page')=='item') { ?>
        <title><?php echo osc_item_title(); ?> </title>
        <meta name="title" content="<?php echo osc_item_title(); ?>" />
        <meta name="description" content="<?php echo osc_item_city().' - '.osc_item_category().' - '.osc_item_title();?>"/>

    <?php } else { ?>
        <title><?php echo meta_title() ; ?></title>
        <meta name="title" content="<?php echo osc_esc_html(meta_title()); ?>" />
        <?php if( meta_description() != '' ) { ?>
            <meta name="description" content="<?php echo osc_esc_html(meta_description()); ?>" />
        <?php } ?>

    <?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant