How to manage wordpress knowledge base/wiki/posts collections

WordPress already provides a built-in mechanism for navigating collections of posts called “Archives”. Taxonomies such as “Category” naturally create a collection of posts – and thus WordPress automatically facilitates taxonomy archives. Meanwhile, pages are intended to display singular, definitive content that is usually timeless. It sounds to me as though your “Topics” should be top-level … Read more

Problem with function.php.. like

That’s a backdoor code injected probably caused by a nulled theme or plugin in your site. I’m having the same issue. The solution is to scan the whole site and get rid of everything you haven’t paid for.

WooCommerce Orders pagination

OK. As far as I researched the WooCommerce provides default pagination for orders in My Account page. See this GitHub issue here. And also see, there is a hook declared at my-orders.php in your code called woocommerce_before_account_orders_pagination by doing <?php do_action( ‘woocommerce_before_account_orders_pagination’ ); ?> So WooCommerce provides default pagination. You better use it. May be … Read more

WP_Query not returning results

if you print_r($houseQuery), what is your request query? It’s a correct SQL query? When you print WP_Query object you can find this in structure: [request] => SELECT SQL_CALC_FOUND_ROWS[…] You need to analyze this to understand what’s going on. Let me know.

wp_query on search results page showing all results every time

Don’t create a new WP_Query. As per the template hierarchy WordPress uses the search.php template in your theme for the search results page. This template just needs to contain The Loop, and the only posts inside that will be your search results. See Twenty Seventeen’s search results template as an example: https://github.com/WordPress/twentyseventeen/blob/master/search.php

Visual Composer Data Source?

I found this in the raw category template in the woocommerce files. <?php /** * The template for displaying product category thumbnails within loops * * This template can be overridden by copying it to yourtheme/woocommerce/content-product_cat.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will … Read more

Exclude specific product tags from related products in WooCommerce 3+ [closed]

The first parameter of the filter gets its value from function wc_get_product_term_ids: http://hookr.io/filters/woocommerce_get_related_product_tag_terms/ This function returns an array of term_ids instead of objects: https://docs.woocommerce.com/wc-apidocs/source-function-wc_get_product_term_ids.html#860-871 So you can match the term id values directly or you can use get_term_by to get one of the term objects in the comparison. e.g. getting the term on the right … Read more