• I have a widget on my site that is only displayed on the homepage using is_front_page(). When the page is shared to facebook, under the title of the page, an error is displayed where the description to the page should be:

    : syntax error, unexpected ‘;’ in /home/thisblew/public_html/wp-content/plugins/widget-logic/widget_logic.php(286) : eval()’d code on line 1

    Line one of the plugin:
    $plugin_dir = basename(dirname(__FILE__));
    Can I remove the semicolon, or will that trigger an even bigger error?

    It doesn’t happen on any other pages, only the 1 page where the widget is displayed.

    https://wordpress.org/plugins/widget-logic/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter maineyak

    (@maineyak)

    Well I got my answer. I deleted the semicolon and got this error on my site:

    Parse error: syntax error, unexpected ‘load_plugin_textdomain’ (T_STRING) in /home/xxxxxxx/public_html/wp-content/plugins/widget-logic/widget_logic.php on line 15

    How can this be fixed?

    Thread Starter maineyak

    (@maineyak)

    Well, I commented out the first line, the widget shows and there’s no errors, so I don’t even know why the first line is even there.

    //$plugin_dir = basename(dirname(__FILE__));

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Throws an error when a page is shared to Facebook’ is closed to new replies.