Topic: Custom query changes when I save – extra backslashes | WP Masonry Layout

Custom query changes when I save – extra backslashes

Home Forums Lite Version Custom query changes when I save – extra backslashes

This topic contains 0 replies, has 1 voice, and was last updated by  Mats 8 months, 3 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #22058 Reply

    Mats

    WP: 5.0.3
    WP Masonry: 1.8
    Theme: Catch Responsive

    Hi! I’m creating a site for a music festival. We have different pages for different kind of bands. I use categories combined with “Custom Querys”. After update to WP 5.0.3 from 4.X there is a problem with the querys.

    I create a new shortcode and type in the query. When I save it changes like this:

    $query = new WP_Query( array( \’category_name\’ => \’Dans\’ ) );

    became

    $query = new WP_Query( array( \\\’category_name\\\’ => \\\’Dans\\\’ ) );

    There is 3 backslashes instead of 1, and as a result the page show ALL categories.

    What to do?

    Thanx in advance!

Viewing 1 post (of 1 total)
Reply To: Custom query changes when I save – extra backslashes
Your information: