Using tax_query to get single post per category

Set ‘posts_per_page’ to 1 on your args variable. I also suggest that you add ‘page-attributes’ while registering the magazine’s post type and order the result by ‘menu_order’. This way, you will have the field Order while editing a magazine, and set the highest which should appear on this query.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)