• Resolved hwuser

    (@hwuser)


    Hello, the following shortcode fails me:

    [travelers-map post_types=cpt_xxx current_query_markers=true]

    I have posts and the CPT “cpt_xxx”. I also have the taxonomy “tax_yyy”. I use this taxonomy for both: posts and the cpt_xxx.

    So, in the archive page template (FSE) of the taxonomy tax_yyy, I put the shortcode, and both the posts and the cpt_xxx that have the taxonomy tax_yyy selected appear on the map…

    I understand that only the cpt_xxx post types should appear on the map, right? (I put in the shortcode post_types=cpt_xxx)

    Thanks!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Camille V

    (@socrapop)

    Dear @hwuser,

    current_query_markers has priority over the other attributes and override them, that’s why your shortcode is showing everything using the taxonomy if you are on the taxonomy ??

    Is you need only cpt_xxx posts with tax_yyy you should use the shortcode parameter post_types and the one for customtax (use the shortcode helper, sorry I don’t have access to the plugin right now ?? )

    Thread Starter hwuser

    (@hwuser)

    That doesn’t work for me because the tax_yyy is also shared by the posts and by the cpt_xxx… So even though I put post_types=cpt_xxx and put all the taxonoias tax_yyy it will continue to show me the posts too… What a shame… thank you!

    Thread Starter hwuser

    (@hwuser)

    Hello Camille,

    I have been able to solve it by adding this line of code in the query, in the conditional if the shortcode has $current_query_markers = true, also add the option that if the CPT have been chosen, it also filters them.

    line 169 includes/public/cttm-shortcode.php
    'post_type' => $post_types,         

    Greetings!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode error in the taxonomy FSE archive template’ is closed to new replies.