Forums

changing the default language meta tags (6 posts)

  1. ronniead
    Member
    Posted 1 year ago #

    Hey all,

    Some of the sites I design in wordpress are in different languages, such as french, english, spanish. I don't need the wp-admin in a different language...it's just I'd like the content to have the correct meta tags.

    At present, it seems to default to:

    <html dir="ltr" lang="en-US">
    <meta charset="UTF-8" />

    And I'd like on some of my sites for it to default to something like this:

    <meta http-equiv="Content-Language" content="FR">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    Anyone have any ideas?

    Thanks

    Ronnie

  2. Christine
    Moderator
    Posted 1 year ago #

    You simply need to edit your header.php file.

    Go to Appearance > Editor select the header.php and change the code there.

  3. ronniead
    Member
    Posted 1 year ago #

    Could that depend on the theme? Because the default theme I can't see an opion to edit the header.php

  4. Christine
    Moderator
    Posted 1 year ago #

    Well all themes have a header.php

    Can you get to the editor and see your files? -- If yes, then the list of files is on the right.

    Are you the administrator on that site? -- If not, then ask your admin person to change your status.

    Can you access your theme files via FTP? -- If yes, then download your theme and play with it on your desktop and then re-upload the files.

  5. ronniead
    Member
    Posted 1 year ago #

    Oh I see what your saying. This solution won't work for me.

    I have a MultSite setup which means that if I make a change to one template, it will effect all my other sites (which are in various languages). I may have to resort to a plugin which can help.

    Any ideas?

  6. diego018
    Member
    Posted 11 months ago #

    maybe if you use a php function in the header with this :

    if url is "blog english" then "content="US"
    if url is "blog french" then "content="FR"

    i don't remember how to code php but i think someone with basic knowledge on it can help you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags