Skip to content

Tag: wordpress

Custom WP_Query ‘posts_per_page’ is not working

I’m having trouble with multiple posts showing when I’ve declared ‘posts_per_page’. During my research my code has developed but with still no results. I’ve tried ‘ignore_sticky_posts’ => 1, ‘nopaging’ => true (pagination) switching theme and deactiv…

How to load wordpress child theme css after parent theme css

In my wordpress child theme css file loaded before main theme css. My child theme css functions.php file is given below I want to load child theme css after parent theme css. Answer Add the priority. Here 99 is high, so it will likely be last but some plugins may add css at a higher priority, though it’…

Replace watermark text from searchbar html

I would like to change the placeholder and tooltip text on my search bar. The search box looks like the image below. In other words, I would like to change “Search …” and “Search for:” to something else. Here is the relevant code from searchform.php: I found out that replacing &#…

Force WooCommerce to update fragment

I created plugin which uses WooCommerce fragments for showing to user how many points they have. When user uses some of the points (by adding product into cart) everything works ok. But when admin adds points to user by admin-interface, the fragment is not updated until user adds a new product into cart. Here…