Hi Leslie,
This error message isn’t do to any sort of compatibility problems – instead, it’s coming from one of the snippets you’ve added.
I can’t tell you exactly which one it is, but the code has 58 lines, so it shouldn’t be too difficult to track down.
If you’re able to upload the code somewhere (perhaps on http://gist.github.com), I can take a look at it for you and see what the problem might be.
Hi, thanks. I have now removed the only snippet from my site. That snippet successfully created a custom post type before I tried to install Code Snippets. The snippet came from a GenerateWP template. It is publicly available at https://generatewp.com/snippet/GX0O2wz/.
In addition to deleting the above snippet from my wp files, I have deactivated and deleted the plugin that I created to hold the snippet.
Yet I still get this message when I try to install Code Snippets:
An error of type E_PARSE was caused in line 58 of the file /home1/lexataca/public_html/hlm/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code. Error message: syntax error, unexpected end of file.
Doesn’t the above indicate that the error is on line 58 of your php file snippet-ops.php? For your reference, lines 55-61 of that php code are as follows:
/* Build a query containing the specified IDs if there are any */
if ( $ids_count > 1 ) {
$where = $wpdb->prepare( sprintf(
‘ AND id IN (%s)’,
implode( ‘,’, array_fill( 0, $ids_count, ‘%d’ ) )
), $ids );
}
Thanks again for your help. As noted above, you can check line 58 of my snippet at the above link. I would be grateful if you would look at it, if you still think the error comes from there, even though it’s been removed from my site and wp files. Best, Leslie
Hi Leslie,
The error message indicates that it comes from the snippet, not from the file. The reference to the file from the plugin only indicates the part of the plugin responsible for executing all the snippets.
It looks like you have made a mistake when copying the snippet into Code Snippets, possibly leaving off some important characters near the end. I would recommend double checking whether this is the case before anything else.