Forum Replies Created

Viewing 15 replies - 1 through 15 (of 34 total)
  • Thread Starter maryando

    (@maryando)

    Hi, yes I’ve solved it by removing the plugin. It forced me finally to write own email content including footer properly and skip using the plugin. Thanks for your help anyway.

    Kind Regards

    Thread Starter maryando

    (@maryando)

    Hi,

    Thank you for your answer however I have already answered your question but for some reason it was not saved, so I’m sorry about delay ??

    So, the image was working correctly for the passed couple of years and only stopped working after your recent update.

    Image is hosted on my hosting and have correct rights as it was uploaded to the WP library, so there is no needs to mess with rights of the image.

    It only doesn’t work on apple native mail app. It works on my desktop (MS Outlook), but I have no possibility to check if it works on Android phones as I never owned one.

    One think I’m sure is that it happened at your last update and right now all the emails looks terrible, so I’m considering removing your plugin from my site for good. As I can’t afford things like this.

    Hope you can fix it…

    Kind Regards

    Thread Starter maryando

    (@maryando)

    And in order to get CF7 to work at the backend it need to be hooked to a few hooks at the admin area like admin_footer() etc. Is this possible to achieve somehow?

    Thread Starter maryando

    (@maryando)

    Hello Amit, and thank you for your reply, but I don’t want to use single or archive post type having one template for all services. I need to have unique separate templates for each service. Same as with the pages is this duable?

    Thread Starter maryando

    (@maryando)

    I have noticed that when scripts are enqueued directly in functions.php all works perfectly. When the scripts is exported in main.js and bundled by @wordpress/scripts then the jQuery is not working. Is there any issue with @wordpress/scripts then? Actually I’ve pasted above how jQuery is bundled and I don’t see anything wrong there. Looks like is bundled properly but somehow it doesn’t work.

    • This reply was modified 2 years, 4 months ago by maryando.
    • This reply was modified 2 years, 4 months ago by maryando.
    • This reply was modified 2 years, 4 months ago by maryando.
    Thread Starter maryando

    (@maryando)

    Thank you so much for your answer, I tried this already and none of those methods works.
    My scripts are bundled into index.js and this file is enqueued in my function.php files so all setup works as I can see the jQuery code inside index.js file compiled by web pack and it looks like this:

    /***/ "./src/modules/Accordion.js":
    /*!**********************************!*\
      !*** ./src/modules/Accordion.js ***!
      \**********************************/
    /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    
    "use strict";
    __webpack_require__.r(__webpack_exports__);
    /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
    /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
    
    jQuery(document).ready(function ($) {
      var headers = ["H1", "H2", "H3", "H4", "H5", "H6"];
      $(".accordion").click(function (e) {
        var target = e.target,
            name = target.nodeName.toUpperCase();
    
        if ($.inArray(name, headers) > -1) {
          var subItem = $(target).next(); //slideUp all elements (except target) at current depth or greater
    
          var depth = $(subItem).parents().length;
          var allAtDepth = $(".accordion p, .accordion div").filter(function () {
            if ($(this).parents().length >= depth && this !== subItem.get(0)) {
              return true;
            }
          });
          $(allAtDepth).slideUp("fast"); //slideToggle target content and adjust bottom border if necessary
    
          subItem.slideToggle("fast", function () {
            $(".accordion :visible:last").css("border-radius", "0 0 10px 10px");
          });
          $(target).css({
            "border-bottom-right-radius": "0",
            "border-bottom-left-radius": "0"
          });
        }
      });
    });

    there is no errors in DevTools, module is exported and injected to index.js file correctly but the code is not working. It works when moved to CodePen but not in my theme ??

    • This reply was modified 2 years, 4 months ago by maryando.
    • This reply was modified 2 years, 4 months ago by maryando.
    Thread Starter maryando

    (@maryando)

    Thanks so much all works perfectly!

    • This reply was modified 2 years, 5 months ago by maryando.
    Thread Starter maryando

    (@maryando)

    Yes I know what API does but this is a simple portfolio website, but the errors annoying me so much. I have moved all the content to the fresh WP installation and guess what! The errors are not there, but soon as I moved the DB they are showing back again.
    This site is built on Elementor and Astra Child Theme and I think this might be the problem. I never had anything like this building my custom theme and writing the code myself. But with those page builders there are always millions of problems.
    Thanks

    Thread Starter maryando

    (@maryando)

    Hi thanks for your reply and valuable ideas!
    Yes the REST is working after issuing wp-json/wp/v2/posts I have a posts outputted in the array. However I’ve changed the only one administrator last time and when I first time issued the wp-json/wp/v2/posts I had an empty array outputted, so created two brand new posts under this current admin and array is outputting them nicely.

    I have no idea what’s causing this. I have deactivated 5 plugins I have and changed my theme to default one but still (there are only two themes) the same errors.

    I will probably install a fresh copy of WP and move all my content there to just get rid of those annoying errors. As you’ve said I don’t need API, so website will still works, but I don’t like when something is not working as it should.

    Thanks so much!

    Thread Starter maryando

    (@maryando)

    Thanks, yes I didn’t thought about that ?? The other way is the default way so the page will always be in English and user will be able to change the language using the switcher located in the header. This is not what I want, so I will try to write something, but I’m not that good yet ??

    Thread Starter maryando

    (@maryando)

    Yes, by hard coded I mean only this language element on the header, this way I will be sure that the right attribute is assigned to the specific language.
    Using language_attributes() function WP will insert incorrect attribute globally, well the attribute will be right for some pages ??

    But this lang attribute is not doing anything regarding the content. So it won’t choose a page in specific language and serve the user. This is only to tell the browser which language to expect.

    I found interesting piece of code online which is redirecting to specific page accordingly to user browser language settings:

    $sites = array(
        "en" => "https://en.mysite.com/",
        "nl" => "https://nl.mysite.com/",
        "el" => "https://el.mysite.com/",
        "de" => "https://de.mysite.com/",
        );
     
    // Get 2 char lang code
    $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
    // Set default language if a '$lang' version of site is not available
    if (!isset($sites[$lang])) {
    $lang = ‘en’;
        }
    // Finally redirect to desired location
    header('Location: ' . $sites[$lang]);
    exit ;

    so I can use it like this:

    $sites = array(
        "en" => "https://mysite.com/",
        "pl" => "https://mysite.com/pl/",
        );
    
    $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
    if (!isset($sites[$lang])) {
    $lang = ‘en’;
        }
    header('Location: ' . $sites[$lang]);
    exit ;

    This function (if the browser language is Polish) will redirect to the polish version of the page otherwise it will go to English one.
    Which is exactly what I want.

    Using above function user will land on PL or ENG version of the home page and from there I can create on both versions buttons, menus etc containing links to other (PL or ENG) pages using get_page() function. So all should works seamlessly but the question is if this is the right approach.

    If you can see any other option that would be great to hear.
    Thank you for your time. I really appreciate this!

    • This reply was modified 2 years, 7 months ago by maryando.
    Thread Starter maryando

    (@maryando)

    Hi, @bcworkz and thanks so much for taking your time and answering me.
    However I don’t think I get that fully.

    I know that language_attributes() will output the correct language but it will only output the language we’ve set at the backend, so if English has been set at the backend it will result in <html lang="en-GB"> and the same goes for other language. I’m using this function for standard sites.
    This function will output correct html tag to the pages globally, so even to my Polish pages which is not what I would like to achieve, correct me if I’m wrong.

    What I need is something like this probably.

    if (the user browser language is Polish) {
        grab slug 'home-pl';
    } else () {
        grab 'home'  
    }

    Again I’m not sure if I explained this correctly. I don’t want to use plugins or multisite options, but like I have said I may not understand this fully. So hoping you can elaborate a bit more.
    Many thanks

    Thread Starter maryando

    (@maryando)

    @jameskoster you are a star!
    I was not able to find any info on that! Thanks a lot, yes this works perfectly, I was always adding captions when the images was already inserted, so this is why the description was not showing up.

    However this seams to be an option not designed for SEO purposes, because when enabled, the caption is displayed on the page and must be displayed in order to appear in the source code and be read by search engines. Of course this can be hidden by CSS but this will be always a bad idea as Google is not that stupid ??

    So I will skip this part for now and for SEO purposes use the alt field only.

    Many thanks for your time James!
    Kind Regards

    • This reply was modified 2 years, 9 months ago by maryando.
    • This reply was modified 2 years, 9 months ago by maryando.

    Life saver! Thanks so much!

    Thread Starter maryando

    (@maryando)

    Thanks guys!

    I have already fixed this yesterday, well today at night ??

    Database URL’s changed as ‘Yoast Test Helper’ as Michael mentioned above as found this on other forum last night.
    The rest of 13 entries in database changed manually but all database problems was mainly from Yoast.
    Then all site links changed by VSCode.
    All works as it should now.

    The funny thing is that I still don’t know if this is a normal situation.
    I understand the mess with the Yoast plugin, that before moving the website to the staging environment the plugin need to be disabled. Then enabled only when the site is back to the live domain, but I’m still don’t know if this is correct way of doing this.

    Then why all other links changed.

    So what I did exactly?
    Because I was revamping the website totally I decided to move it to the staging domain and work there then when the web is finished move it back to the original domain.

    Is moving WordPress not that simple as:
    – zip the web folder and move it to the another domain
    – moving database,
    – changed the URL’s in database in _options table,
    – changed the database details in wp-config file,
    Is something else must be done in order to do it correctly?
    Or maybe all was done correctly and WPRocket, Yoast created this mess?

    I found so many URL’s from staging domain in so many files that this is just crazy for me.

    Andy, thanks, yes, I need to put my hands on WP CLI for sure.

Viewing 15 replies - 1 through 15 (of 34 total)