• Resolved raininger

    (@raininger)


    Hello,

    The display posts shortcode returns the <a class=”title”> link with the post-ID e.g. /?p=234 instead of the permalink and therefore the post is not found when you click on the link.

    I asked ChatGPT and the answer was I should use [display-posts link=”permalink”] but this does not work either.

    Can someone help me?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter raininger

    (@raininger)

    What I found out in the meantime: the posts all have the status “scheduled” because the dates are in the future (upcoming events). My shortcode uses the options post_status=”future” / orderby=”date”. It seems that the post_status ‘future’ causes the problem. When I change the date of a post to the the past, post_status changes to ‘published’ and the permalink is correct.

    Is there a way to keep the post statuses ‘scheduled’ and nevertheless get the correct permalink (with postname instead of post-id)?

    Plugin Author Bill Erickson

    (@billerickson)

    Scheduled posts don’t exist yet because they have yet to be published.

    You shouldn’t use the post date to indicate a future event date. The post date should be when you first published information about the event, and the event date should be stored in a separate field.

    I recommend using an events calendar plugin (The Events Calendar, Sugar Calendar, etc) or use a plugin like Advanced Custom Fields to add an “Event Date” field to the post editor.

    Then, you can customize the Display Posts listing to sort by event date instead of post date. Here are a few tutorials:

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title link in posts list not working’ is closed to new replies.