Make WordPress Core

Opened 3 years ago

Closed 5 months ago

#58714 closed defect (bug) (worksforme)

View post link issue in post/article listing screen

Reported by: hiren1094's profile hiren1094 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: needs-screenshots
Focuses: administration Cc:

Description

Hello,

View post or permalink not generated when "public" argument is "false" in custom post type but "View" link show in post/article listing screen if "public" argument is "false" so It should be not shown in listing screen

Attachments (1)

Artcle-Listing-2.png (45.4 KB) - added by hiren1094 3 years ago.
Screenshot Added

Download all attachments as: .zip

Change History (2)

@hiren1094
3 years ago

Screenshot Added

#1 @SirLouen
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This is strange.
There is a condition is_post_type_viewable that inhibits this button:

register_post_type( 'test', [
    'label' => 'Test',
    'public' => false,
    'menu_position' => 5,
    'supports' => ['title', 'editor', 'thumbnail'],
    'has_archive' => false,
    'show_in_menu' => true,
    'show_ui' => true
]);

https://i.imgur.com/I0zYGyc.png

And this has been like this for more than 10 years.

You might have configured your CPT wrongly. Closing this as worksforme. You are welcome to provide more information (like your CPT setup) if you believe that there could be a real bug here.

Note: See TracTickets for help on using tickets.