Skip to content
Advertisement

Tag: wordpress-theming

WordPress: passing $query to separate template file

I have the following code: homepage.php loop-feed-work.php But when I view my homepage, I get the following error: Fatal error: Uncaught Error: Call to a member function have_posts() on null in ******/loop-feed-work.php:1 Could this be because the query is in a different template file? Answer That’s exactly the problem. Unfortunatly get_template_part doens’t work like an include so you will lose

Undefined function wptexturize()

I’m really new to wordpress and I had just encountered this error: I also tried checking on https://developer.wordpress.org/reference/functions/wptexturize/ and I had traced the callers and functions used by this wptexturize() to no avail. The main issue seems to be that the function is undefined. So I checked on the formatting.php file and there it was, clearly defined. My guess is

Advertisement