Site logo

[Resolved] Issue with Query Loop block on the front-end

Home Forums Support [Resolved] Issue with Query Loop block on the front-end

Home Forums Support Issue with Query Loop block on the front-end

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #2491883
    Ying
    Staff
    Customer Support

    Can I see your site?

    #2491951
    Yerai

    Of course, I have left the access in the private area

    #2491992
    Ying
    Staff
    Customer Support

    Can you try this PHP snippet instead?

    add_filter('request', function( array $query_vars ) {
        if ( is_admin() ) {
            return $query_vars;
        }
       if (! is_single()){
        if ( isset( $query_vars['category_name'] ) ) {
            $pagename = $query_vars['category_name'];
    
            $query_vars == array( 'pagename' => "$pagename" );
        }
    
        return $query_vars;
    	   }
    	return $query_vars;
    } );
    #2492045
    Yerai

    Hi Ying,

    That snippet works.

    Posts right now look how they should. But now category pages aren’t replaced by a static page 🙁

    Is there a way to fix that issue?

    #2492099
    Ying
    Staff
    Customer Support

    Can you disable the Strip Category Base option in Rank math?

    #2492141
    Yerai

    I seems it now works well, thank you Ying!

    #2493320
    Ying
    Staff
    Customer Support

    Glad to hear that 🙂

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.