2021-01-10 15:09:27

Related Docs

Do You Need Help or Expertise?

Is editing Source Code not Your Thing? Are you in a tight Time Schedule and need to deliver a fully scalable and safe solution fast to your Clients?

Maybe you want to incorporate the Software found on TukuToi unbranded and royalty free in your Clients Projects after customizing it as per your Projects requirements?

Or eventually you need some training on any WordPress Plugin, Theme or their creation and maintenance?

FilterChange WP Query (pre_get_posts)

add_filter( 'pre_get_posts', 'custom_wp_query' );

function custom_wp_query( $query ) {
    if ( ! is_admin() && $query->is_main_query() ) {
        if ( is_archive() ){
            if ( !is_tax( 'your_tax' ) && !is_404() ){
                $query->set( 'post_parent', 0 );//any valid query attribute
            if (!is_post_type_archive()) {
              $query->set( 'post_type', array('post', 'page', 'a_custom_post_type') );//any valid query  attribute
    return $query;