Tag Info

Hot answers tagged

3

Your issue is in the callable object you add: array( __CLASS__, "build_shortcode") This translates to: array( "WC_Product_Categories", "build_shortcode") Which is equivalent to: WC_Product_Categories::build_shortcode(); But build_shortcode is not a static function/method, and static functions/methods do not have a $this object, because there is no ...


3

You'll need to log onto your FTP server and goto the wp-content folder -> plugins -> and delete the GZIP plugin you have installed. If you are not sure about FTP, you can probably try and go through your web server control panel, they usually have some sort of file browsing option. You might also need to check the .htaccess file also, but just try removing ...


2

You need to escape your quotes, or use doubles, or use heredoc: // Escaped return '<div id="xxxx-xxxxxx"></div> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({ mode: \'xxxxxxx-xxxxx\', container: \'xxxxxx-xxxxxxx\', placement: \'one word word\', target_type: ...


2

the_title() calls your function again. If you want to avoid that, remove the callback inside of your function: function filter_title_after() { remove_filter( current_filter(), __FUNCTION__ ); // the rest of your code. But you shouldn’t call the_title() in your function at all: it prints the title – this is not what you want – and you get the ...


1

Found the problem. It was a problem with my host, in the path the ID3 folder name was uppercase, while on the server for some reason it was lowercase, this is why it didn't find it.


1

Do a complete update of WordPress, including all the files. The function named "reset_mbstring_encoding" is in the wp-includes/functions.php file and has been since 3.7, so if you're missing it or some other file, then you need to make sure all the WordPress files are up-to-date.


1

Hey I found the answer in this forum https://wordpress.org/support/topic/fatal-error-cannot-call-overloaded-function-for-non-object-1/page/2?replies=35#post-6035835. "Just wanted to share how I fix the issue. In the cpanel control panel, choose "Select PHP version". Then I select "PHP Version 5.5". Then click save." Worked for me. It seems like it's a ...


1

From the error you posted, I suspect that there was some kind of file corruption. The original file /wp-includes/post.php shouldn't end at line 235. The file should have 5841 lines (in WP version 4.0 and 4.0.1). If it was a file corruption and the error doesn't appear anymore, the update probably "healed" the damage by overwriting the file. Nevertheless I ...


1

Instantiate your object inside a function hooked to the template_redirect action: function wpse_177056_init_shortcode() { new callShortCode(); } add_action( 'template_redirect', 'wpse_177056_init_shortcode' );



Only top voted, non community-wiki answers of a minimum length are eligible