Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter adamjz

    (@adamjz)

    I forgot i also tried adding replace_text and translate_text to functions.php

    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    The Haze theme appears to be a premium theme. I have no way to test the plugin with it.

    To test the plugin with it, I would suggest you look for something simple to replace e.g. a page title or something not likely to be impacted by other plugins. If you can replace something, then it just becomes a matter of figuring out the right match rule for the “Read More” text.

    Thread Starter adamjz

    (@adamjz)

    Thanks for your answer, I could use the plugin someday if I learned this rules I suppose. For now I managed to find the right plguin template php to translate it finaly.
    However this is still intresting to me, I copied and pasted this text correctly after all. So this rule would have to consider the containing element, like in screenshot or maybe full path? It’s odd because your plugin indeed worked on other elements without specifying them, raw text input in simple search was enough.

    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    How did you view the text to copy? The safest way is by viewing source and then copying from there. Any other way sometimes leads to problems because you’re not actually grabbing the code in the page, but grabbing what the browser is showing you which may be altered.

    Thread Starter adamjz

    (@adamjz)

    That’s how I did it, copied from source, with an exception source contained some spaces around the text (like ” <space> <space> <space>Read more <space> <space> <space> “), but i tried matching them with /s aswell, and not that it should matter anyway since in the middle there was plain Read more witch I copied.
    This Visual Composer is really strange, I would never use it, but I was updating someone’s site.
    I also tried jQuery for this and it, just like your plugin, worked on other parts of the page, but couldn’t handle the Read more, even on the offline version of the page’s code, here’s the function btw:

    function escapeRegExp(string) {
        return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
    }
    
    function replaceAll(string, find, replace) {
      return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Haze theme’ is closed to new replies.