• Resolved E.

    (@ebhead)


    Help!

    Though your install directions here, on wp, do not say it’s required, your plugin settings, after it’s installed say differently.

    As you know, when I get into the General settings, it says,
    “Copy and paste the following code into any PHP file

    <?php echo do_shortcode(‘[prisna-google-website-translator]’); ?>” as if to imply that this step is required.

    So, I pasted it into my child theme’s function.php, hit update, and got the W.S.O.D. Thankfully, I did it only to the child theme, so I was able to copy over the parent’s good functions.php file to restore site access.

    I figured I pasted it into the wrong section, by mistake that time- user error. So, I redid it, this time, making sure that I scrolled all the way down to the bottom of the functions.php file first. Then, I pasted that code there, hit update, and got yet another WSOD. I’ve just recopied the functions.php file from the parent theme back into the child theme to restore access the 2nd time.

    Am I doing this wrong? What could be causing the WSOD? do you really mean any php file? What should I do to get this working, ’cause I can’t move forward adding it like I have so far.

    I really want to use this plugin, and I will need a prompt answer, or I’ll have to switch to a different one.

    https://www.ads-software.com/plugins/google-website-translator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Prisna

    (@prisna)

    Hello,

    the install guide specifies 3 different ways of adding the plugin:

    1. Using a widget
    2. Add a shortcode
    3. Add a PHP line of code

    You opted to use 3. in which case you should know where to add it. The guide says any PHP file, but it’s referring to any page/post/category/etc PHP theme file. If you add it in the functions.php and not in a hook, by the time the line of code is executed, the plugin doesn’t exist in the runtime environment, so you’re basically calling a function that doesn’t exist yet. To use the option 3. you need to have a medium level knowledge about PHP and WordPress.

    I recommend you to use either 1. or 2. which don’t require any PHP file editing. May I ask you why you opted to use 3.?

    Also, if you select the Tabbed option in the Display mode setting, and save; you won’t need to do anything else other than selecting the location in the Style mode setting.

    Let me know if you need further assistance.

    Thread Starter E.

    (@ebhead)

    Hi,

    Thanks for responding.

    Your screen does not make it clear that those are options. As I’ve said, it implies they’re all necessary. That is the ONLY reason why I tried to do that. Again, it says “Copy and paste the following code into any PHP file.” It does not say any of the types you specified in your reply, above. So, you can see how it’s unclear and lead to the WSOD. Please make that more clear in an update.

    Otherwise, excellent plugin so far. Thanks for making it. ?? If it works out I’ll rate it 4. I’ll rate it 5 if you make those directions more clear in an update.

    Hi ebhead,
    Same thing here! Wish I had seen this before AND that the admin of the widget changed the directions. So unclear!
    My website is now off. So annoying when it’s professional. How did you manage to recover your site from the WSOD? Don’t know what to do next.
    Thanks.

    Hi guys, I’m going to open another thread as I think no one answers because this one is resolved. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘white screen of death after adding code to php file’ is closed to new replies.