Viewing 30 posts - 31 through 60 (of 61 total)
  • Author
    Posts
  • #1418111

    PS: still a little problem before cloning the site: I wanted to design the structure of a new set of products that are going to come on the site in some months, so I don’t have to copy them 5 times, but they keep appearing on the site, no matter if I set them on private or on draft. Is there a way that they don’t appear until the pages are ready but still have them on the model to clone or shall I delete them ?
    Thank you

    #1418190

    Hi,
    I checked your cPanel Administration WordPress, and you can see the database and user for each install by clicking the blue database button:
    Enfold_Support_3168.jpeg
    so you can delete the user and database for these safely, it’s good to check that they are not sharing the database user accounts.
    So I would use the option to uninstall and delete the database & user & directory, and then clone the original main install to create your new ones.
    I also checked your products but they all look like they are published and none are in draft, please try changing the ones you don’t want to show to draft status, this should make them not visible on the frontend, if they are please let us know which ones and where you are seeing them, such as the “shop page”

    Best regards,
    Mike

    #1418946

    Hi Mike,
    I’m having an issue with the clones.
    Since we wrote last time, I cloned an italian and a german version and finished refilling the italian version with content. While I was doing that, I realized there were pages I wanted to add, so I added them to the italian subdirectory as well as to the main site.
    So now and want to do the german version, and I deleted the first german clone I did to make another with the updates, but the system won’t let me name it /DE like the other one, it sais that the repertory already exists !
    (Les erreurs suivantes ont été trouvées : Le répertoire que vous avez saisi existe déjà! Veuillez saisir un autre nom de répertoire).
    Can you please check to see what’s happening ?
    Thank you very much
    Regards,
    Natacha

    #1418949
    This reply has been marked as private.
    #1419104

    Hi,
    Thank you for your patience, I checked your cPanel File Manager and found that you had an empty DE directory, so I deleted it for you, try creating a new clone now.
    Enfold_Support_3268.jpeg

    Best regards,
    Mike

    #1419176

    Hi Mike,
    Thank you very much for your help and your precious explanation. I took note in case it happens again.
    So this is solved. I get back to you when I finish filling the subdirectories with content.
    Have a wondeerful afternoon,
    Natacha

    #1419187

    Hi,
    Glad that this helped, we will leave this open to hear back from you.

    Best regards,
    Mike

    #1420339

    Hi Mike,
    I am done with thre out of five websites and I need to make them all visible as soon as possible.
    Is it possible to link the three subdomains and then add the last two posteriorly, or do they have to be linked all at the same time ?
    Thank you for your quick answer and best regards,
    Natacha

    #1420419

    Hi,
    You can add menu links to the sites that are live, and add the other ones later.
    Try adding a structure like this with the custom menu items and links to each site
    Enfold_Support_3472.jpeg

    Best regards,
    Mike

    #1420734

    Hi Mike,
    Thank you for your tip.
    I created a new menu named Languages and put the three costum menus inside. But I don’t achieve putting them under the first one like you did, “Lang”. What is “lang” ? It doesn’t exist and doesn’t have an url. Where do I take “lang” from ?
    Thank you !
    Best regards,
    Natacha

    #1420735

    PS: I don’t know if it’s correct, but just for info, I created the language menu inside the structure of the French version, my first website existing since last year. Please tell me if I chosed the wrong place.
    Thanks.

    #1420797

    Hi,
    Sorry my example may have been confusing, I checked your base site and see your language menu:
    Enfold_Support_3486.jpeg
    so this is good if you want to show the language menu in the topbar, to do so choose the menu location:
    Enfold_Support_3488.jpeg
    and then choose to show it in the theme settings:
    Enfold_Support_3490.jpeg
    Or you can add the language menu items to the main menu:
    Enfold_Support_3492.jpeg
    in this case you might wish to add a folder called “lang” or anything you wish to hold all of your language links, this is what I had in mind in my other screenshot
    Enfold_Support_3494.jpeg
    I hope this explains better.

    Best regards,
    Mike

    #1420834

    Hi Mike,
    I didn’t find the way to do the folder, so I kept the menu separate and did what you said, and applied to the other two sites. It’s working on all three ! It’s a miracle ¨!
    So how do I put the flags now ? I tried the color button in the styles but nothing happens, and by the way I would like to put the flag, a personalized iamge. Could you help me on that one too?
    Thank you so much to allow this magic to happen Mike ! You’r an angel !
    Best regards,
    Natacha

    #1420893

    Hi,
    Glad that this helped, I found emoji flags here and added one to each of your menu labels, and this seemes to work good:
    Enfold_Support_3496.jpeg
    Please note that when you add a flag it looks like country code until you save it, but then it looks correct.
    Enfold_Support_3498.jpeg
    Please check and try this on your other sites.

    Best regards,
    Mike

    #1420932

    Hi Mike,
    Thank you for your add.
    After loooking how it appears, I prefer the simple mention of the languages without colors. So to make it more clear, I wrote the full name of each language.
    I have one small question: the new field with the languages draws a white line on top of the header: is it possible to make it invisible ?
    Thanks again and have a nice evening
    Natacha

    #1420952

    Hi,
    Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #top #header.av_header_transparency #header_meta {
        border-bottom: none;
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1420999

    All clear !
    Your code is great ! Thank you very much !
    Kind regards,
    Natacha

    #1421000

    Mike,
    Is it possible to coordinate the signe pages of the subdirectories ? I make myself clear: if now I’m, say, on Reviews on my english site, and I click on French, I land on the french homepage. Is there a way that I arrive on the french reviews page instead (Evaluations) ? In this way each page leads to the corrispondent page in the other language, like a translation.
    Thank you very much for your previous help!
    Kind regards,
    Natacha

    #1421002

    Hi,
    Yes this is possible and I have made this modification to your site, but in doing so I found that your URLs are not the same across all three sites so you will need to change all pages on all sites to match, and you may not wish to do this, but I added the code so you can decide.
    So to test this I added three test pages on these three sites:

    your french site is your core site with no “FR” in the URL, I know you know this but in the future people will want to know how this works 🙂
    Anyways, I disabled your topbar menu and enabled the topbar Enfold Theme Options ▸ Header ▸ Extra Elements ▸ Phone Number or small info text to hold the language switcher shortcode, you can easily switch back to using the topbar menu there if you wish.
    This is the shortcode I added: [dynamic_lang_switcher lang="EN"] * [dynamic_lang_switcher lang="IT"] * [dynamic_lang_switcher lang="FR"] on the frontend it shows the whole language word:
    Enfold_Support_3528.jpeg
    Then I added this code to the end of your child theme functions.php file in Appearance ▸ Editor on all three sites:

    function dynamic_language_switcher($lang) {
        // Get the current full URL
        $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://";
        $current_url = $protocol . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
    
        // Base URL without language
        $base_url = $protocol . 'guidedtour.ch/';
    
        // If the language is French, return the current URL without language segment
        if (strtoupper($lang) == 'FR') {
            $path = str_replace($base_url, '', $current_url);
            $segments = explode('/', trim($path, '/'));
    
            if (in_array($segments[0], array('EN', 'IT'))) {
                array_shift($segments); // Remove the language segment
            }
            return $base_url . implode('/', $segments) . '/';
        }
    
        // Remove the base URL to get just the path
        $path = str_replace($base_url, '', $current_url);
    
        // Split the path into segments
        $segments = explode('/', trim($path, '/'));
    
        // Check if the first segment is a known language code
        if (in_array($segments[0], array('EN', 'IT'))) {
            // Replace the existing language code with the desired one
            $segments[0] = $lang;
        } else {
            // If the first segment is not a language code, prepend the desired language code
            array_unshift($segments, $lang);
        }
    
        // Construct the new URL
        $new_url = $base_url . implode('/', $segments) . '/';
    
        return $new_url;
    }
    
    
    function dynamic_language_switcher_shortcode($atts) {
        // Mapping short language codes to their full word representations
        $language_names = array(
            'EN' => 'English',
            'IT' => 'Italian',
            'FR' => 'French'
        );
    
        $atts = shortcode_atts(
            array(
                'lang' => 'EN'
            ), 
            $atts, 
            'dynamic_lang_switcher'
        );
    
        $url = dynamic_language_switcher($atts['lang']);
        
        // Display the full word representation, but link to the appropriate URL
        return '<a href="' . $url . '">' . $language_names[strtoupper($atts['lang'])] . '</a>';
    }
    add_shortcode('dynamic_lang_switcher', 'dynamic_language_switcher_shortcode');

    and now you can go to any of those three pages and click the new language switcher and go to the corresponding page in any language.
    But unfortunately it looks like all of your other menu items don’t match across your sites.

    Best regards,
    Mike

    #1421009

    Hi Mike,
    First of all, thank you so much for your astonishing intervention ! I am impressed by all these codes.
    I have a few questions:
    1. is it on the right column navigation of each page in “url, permalien” that I change the url?
    2.Changing the url imples that I have to name them all the same, i.e. all in the same language ? Ex. FR: Attractions touristiques; EN: Sightseeing ? If so, how can I keep the keywords for the SEO ?
    3. I don’t like the asterisc: is it possible to do it withouth them ?
    Thank you for a quick reply: the website is all messed up and I can work till late tonight, but I need it back on track by tomorrow because of job interviews.
    Best regards
    Natacha

    #1421010

    I also that the word appearing in the frontend is alway in english (italian, french, english) in all three sites, whereas I wanted them to appear in the language itself, as it was before (english, français, italiano). Is this possible ?
    and another question: is it possible to make the main french site like the others ?
    I could change the asteriscs, so “only” four questions remain.

    #1421013

    Hi,
    You can remove the asterisc, that was only an example.
    As for the URLs and SEO, I’m not a SEO expert so please research this, but I thought of two options, when you use the Classic Editor you can change the URL to something different than the page title, so I’m thinking that you can for example, change all of the “About” pages to use the URL slug of /about so the language switcher will work, and leave the titles in the appropriate language, like this:
    Enfold_Support_3530.jpeg
    you would need to do this for each language.
    Or you can use a redirect plugin and manually add your pages and the corresponding page for each language, here is an example from the plugin page:
    Enfold_Support_3532.jpeg
    you would need to do this for each language, but all of these redirects will be “301” and I’m not sure if this is bad for SEO, it may be.
    All in all, either of these will be a lot of work, if it was my site I think that I would just use the original menu and assume that if someone landed on the EN site and they really wanted the FR site, that they would be fine with going to the FR homepage. But I probably have not thought about it as much as you have.
    I hope this helps.

    Best regards,
    Mike

    #1421167

    Dear Mike,
    I also agree with you. Too much work.
    I deleted everything, but there is a problem on the homepage of the french website, on top it sais Warning: Unterminated comment starting line 2 in /home/hulaslim/public_html/wp-content/themes/enfold-child/functions.php on line 2

    and on the mobile screen a huge space appears before the slide show.
    The english homepage has a smaller slide-show now, surrounded by a white square around.
    How can I fix this ?
    Thank you and kind regards,
    Natacha

    #1421170

    Since it said line 2, I deleted the asterisk with the left slash. Now it sais:

    Vos modifications de code PHP ont été annulées en raison d’une erreur sur la ligne 2 du fichier wp-content/themes/enfold-child/functions.php. Veuillez la corriger et réessayer d’enregistrer.

    syntax error, unexpected ‘*’, expecting end of file

    Now the computer view shows a normal situation (hopefully) but the smartphone view still has this message “Warning:…..”, but mentioning line 3.

    #1421191

    Hi,
    I checked all three sites and made the adjustments needed, the white space around the EN site slider looks like was caused by the page being saved as a “Block Editor” page instead of the Advanced Layout Builder that it is, I corrected. Please note that ALB pages should not be edited or saved with the Block Editor.
    Please check your sites.

    Best regards,
    Mike

    #1421208

    Hi Mike,
    Thank you very much for your precious help. I hadn’t realized I saved the page as “block editor”. So that it doesn’t happen again, can you tell me where does one have to click to save a page like a block editor ? Is the block editor what in French is called Default editor ?
    Thank you and best regards,
    Natacha

    #1421218

    Hi,
    Yes it is also called the default editor, the WordPress default editor has two choices at Enfold Theme Options ▸ Select Your Editor the Classic Editor & the Block Editor, this is the one that you are currently using. I’m just in the Habit of specifying the one used. when I write.
    This thread is very long now, and it seems like we have covered creating a multi-language site using sub-directories fairly well now, did you have any more questions on this, or do you feel comfortable if we closed this thread?

    Best regards,
    Mike

    #1421223

    Hi Mike,
    We can certainly close the issue.
    But before, can you tell me how to undo the block mentioned by the message “Warning: Unterminated comment starting line 2 in /home/hulaslim/public_html/wp-content/themes/enfold-child/functions.php on line 2” and how to undo the block caused by the saving in the default editor, in case it happens again ?
    Thank you
    Best regards,
    Natacha

    #1421309

    Hi,
    I believe that I already solved the “line 2” error, at least I don’t see it anymore, I checked all three sites, I solved it by correctly the code on the page.
    If you see the editor error again, switch to the Advanced Layout Builder and save the page again, if this doesn’t help you will need to use the page revisions and go back to a version before the last save, so you may lose some of your last edits.
    Whenever you open a ALB page and don’t see the ABL toolbar please use the ALB button to switch to it before saving to page.

    Best regards,
    Mike

    #1421315

    Hi Mike,
    Thank you for the explanation. I noted everything.
    And thank you very much for all of your precious help in doing this cloning and language switcher.
    With your guidance it was all very easy to do. Now I feel comfortable to translate the other two versions on my own and put them online.
    So this never ending issue can now finally be closed.
    Thank you, Thank you.
    Kind regards,
    Natacha

Viewing 30 posts - 31 through 60 (of 61 total)
  • The topic ‘Enfols multilanguage site using child and parents sub-directories on WP basis’ is closed to new replies.