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

How to order “top rated” results by date and meta key?

Your syntax is off – I can see you’re trying to add meta_value as an orderby param, but you’ve actually added as it an array entry – this is why formatting and indentation is important! $rate_query = new WP_Query([ ‘post_type’ => ‘movies’, ‘orderby’ => ‘date meta_value_num’, ‘meta_key’ => ‘wtf_rscore’, ‘posts_per_page’ => 14, ]);

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

Remove divs and spans from post content

Im not sure what you are actually doing here but I think you are looking to create a block of code from the post content then strip unnecessary tags. I would use strip tags: https://www.w3schools.com/php/func_string_strip_tags.asp <?php require “wp-config.php”; // Post Types to include $args = array( ‘posts_per_page’ => ’50’, ‘post_type’ => array( ‘product’, ‘product-variation’ ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)