• Resolved sbckmstr

    (@sbckmstr)


    Hi there,

    Is there currently a way to use modified query vars with Polylang enabled?

    Polylang currently prevents custom post types from showing alongside regular posts on my ‘Latest’ page using the following custom query:

    $args=array(
        'post_type' => array( 'magazine', 'presse', 'post' ),
        'post_status' => 'publish',
        'posts_per_page' => 8,
        'orderby' => 'post_date',
        'order' => 'DESC'
    );
    
    $query = new WP_Query($args);

    Disabling Polylang gets the posts to appear correctly. Is there any way to get this to work?

    Thanks in advance…

    Simon

    Permalinks: https://www.rootsite/%category%/%postname%/
    Static front page.

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    did you enable language management for your custom post types?

    Thread Starter sbckmstr

    (@sbckmstr)

    OK fixed.

    I had already enabled language management for the custom post types, but I had not tagged all the posts with a language.

    Added the default language to all the posts and now it’s all working.

    Thanks for the quick answer and the nudge in the right direction!

    Simon

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang and custom query…’ is closed to new replies.