Problem to display post author
-
Hi,
First, thanks for that incredible plugin. It’s really usefull and powerfull.
I have a problem to display some post on a custom post type page. Each users have a page to display some information about their shop. Include sales and news. I have create two posts categories: sales and news. I want to display thoses articles for each page use by shops owners (i hope i’m clear with these explanations). With a condition if there no sales or news.
So, inside the template i use this code for sales
<?php $sales_shop = ' [if type=post category=sales author=same] [field title] [content] [else]No sales! [/if] '; echo do_shortcode ($sales_shop); ?>But it doesn’t work, it display “No sales!” instead of the two posts i have create. Of course, i don’t want to display the same sales information for a shop owner A and a shop owner B.
I have tried to use a related shortcode to display post of the author (i use Custom Content Shortcode with ACF), it works, but i can’t use it on a condition.
Could you help me please, i’m pretty lost.
Thanks a lot.
The topic ‘Problem to display post author’ is closed to new replies.