Tag Info

Hot answers tagged

2

get_current_screen() is a backend function and it returns data about the current backend administration page. It makes no sense to use this in theme code. The only way it would work (I think but haven't tested) in functions.php would be if it were hooked into a backend hook later than admin_init. You don't explain what you are trying to do with ...


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