Different template for most recent post?
-
Scenario: I have a CPT called “Market Reports.”
I want the most recently published Market Report to use is_user_logged_in to only show to logged in users. Non-logged-in uses are displayed a login form. Logged-in users are shown the post content.
I know I can do this manually by simply creating two different single.php templates and changing them when I create a new post.
However, is there any way to use some code in the template to check if there is a more recent market report post and do this dynamically?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Different template for most recent post?’ is closed to new replies.