Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Your query is not qualifying results by post_status=’publish’ so you are getting backup and auto-saved posts. When WP gets such requests, it automatically filters out backups and auto-saves, so nothing is returned by a WP query.

    BTW, it’s inadvisable to use GUID to construct URLs. While it invariably works (if you get published posts), that is not the purpose of the field. It does not have to contain an URL, the only requirement is that it is a unique string. You should construct your URLs from the site address with ‘/?p=’ and the post’s ID from the proper ID field appended.

    Thread Starter elearn2014

    (@elearn2014)

    +————-+——+—————————–+———————————–+
    | post_status | ID | guid | post_title |
    +————-+——+—————————–+———————————–+
    | publish | 785 | https://hwy.local/wp/?p=2426 | tar and untar |
    | publish | 1470 | https://hwy.local/wp/?p=1470 | debian toolkit |
    | inherit | 2964 | https://hwy.local/wp/?p=2964 | tar |
    +————-+——+—————————–+———————————–+

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why the post can be selected ,but can’t be displayed in firefox with guid?’ is closed to new replies.