Tag Info

Hot answers tagged

1

Your use of the_content filter is wrong. Please check how it should be properly used in the codex in the link supplied First of all you are totally replacing the_content with nothing, that is why you get a blank screen. The reason is that you are not calling the $content variable in your function Secondly, if you've called the variable, you would have ...


1

This could be the matter of adjusting the priority of your filter callback, since the plugins files are executed before the functions.php theme file. That could explain why it works in your functions.php file, if the priority is the same. When you add the code snippet to a plugin, it might be executed before the other plugins that use the same filter. The ...


1

The $tag is used as a key in an array, so it is converted to either a string or an integer. There is no maximum size for strings, the available memory is the only real restriction. The size of an integer depends on the platform: The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits ...


1

I always thought that the memory size was the limit for the string length, but according to the PHP documentation: string can be as large as up to 2GB (2147483647 bytes maximum) There is also the maximum allowed memory size (memory_limit) for the PHP script, to consider. Testing: Do not perform this on a production server: You could always use the ...


1

In short: WordPress uses the term count in various places. There's even another count that it's in the options table. So as long as you are talking about the core behavior, then the recommendation is: Never ever touch the WordPress cores term counting mechanism! It's hard enough to bring it to work in some cases (manually updating term stuff in very, ...


1

You don't need to create additional functions, just re-use what you already have and tweak it a bit: function theme_add_bootstrap() { wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/third_party/bootstrap/css/bootstrap.min.css' ); wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . ...



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