Topic: after using custom query shortcode in page keeps loading… | WP Masonry Layout

after using custom query shortcode in page keeps loading…

Home Forums Pro Version after using custom query shortcode in page keeps loading…

Tagged: 

This topic contains 7 replies, has 3 voices, and was last updated by  Masonry Guy 1 year ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14186 Reply

    Joke Portegies
    Participant

    I want to display only the top-level categories, but posts on the sublevels are showing too. I thought I could use a custom query to filter out the subcategories, but now my layout is not loading. This is the syntax I used: meta_key=category__not_in&meta_value=kleding. I tried to use quotes around ‘kleding’ but that gives the same result…

    What am I doing wrong?

    #14192 Reply

    Masonry Guy
    Keymaster

    Hi,

    The custom query you have written is not in right order. For category you can’t use meta_key. That are for custom fields.

    You can use this in custom meta query category__in=123 . Where 123 is the id of your category.

    Thanks

    #14210 Reply

    Joke Portegies
    Participant

    Still doesn’t work. The custom query is now the only filter I use to narrow down the posts I want to see, in a 3-column layout. In the Custom Query I put this: category__in=9 . Still keeps loading and not showing…

    #14240 Reply

    Masonry Guy
    Keymaster

    Hi,

    In that case, can you please send me your wp-admin details with this thread url. I will try to check your category structure and fix it.

    Thanks.

    #14252 Reply

    Joke Portegies

    Hi, I think I’m a bit further in understanding. At least I have a layout now. But I still don’t know how to filter out posts from the subcategory.
    My maincategory is 111 and 112, 113 and 114 are subcategories. You can find my page here: http://www.jannytermeer.nl/Wordpress/test-voor-nieuwe-homepagina/. The only posts I want to see are the posts with the pictures. The other posts are from the subcategories.

    I tried this custom query syntax now, trying to filter out the posts from category 112, 113 and 114 (which are the subcategory’s): category__not_in=array(112,113,114). But the posts keep appearing. Again the wrong syntax?

    Groete, Joke

    #14254 Reply

    Masonry Guy
    Keymaster

    Hi Joke,

    Any chance you can try this format ? category__not_in=112,113,114 ? I am sorry about not being sure myself. That was the reason i asked for the wp-admin details, so that i can try and test here.

    Thanks

    #14270 Reply

    Joke Portegies

    hi Masonry Guy, thank you for your patience. I actually made some printscreens, to show the structure of the main-category and the subcategories, but I could not figure out how to send them with this message. But I got wiser studying the images myself, so I thought I’ld give it another try.

    When I use the category__not_in=112,113,114 the result is that my posts with category 112 are filtered out. The other ones are still in.

    I think I must drop they idea of filtering out the maincategory. I think I’m going to use the meta_key and meta_values, like I did abusively in the first place. Thank you for thinking with me!

    #14271 Reply

    Masonry Guy
    Keymaster

    Hi Joke,

    One of the best idea will be to filter out based in tags if it is applicable for you.

    Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: after using custom query shortcode in page keeps loading…
Your information: