• Resolved Hedley

    (@hedley)


    I’m trying to create a custom post type with which I can display posts on a page, but as view-only – ie: posts that don’t link to a single post view on that page. I’ve fiddled with the public query, etc., so far to no avail.

    It may be that this is a request that no one in their right mind would want, but I thought I’d throw it out there.

    • This topic was modified 1 year, 8 months ago by Hedley.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I think modifying a couple things would be best here:

    1. Whatever templates are being used in this case, when working with displaying the post type posts themselves, remove the links being included with get_permalink() so that they don’t get linked to in the first place
    2. Modify the pre_get_posts code found at https://wordpress.stackexchange.com/a/210245 to check for is_single( 'post-type-slug' ) instead of is_tax( ... )
    Thread Starter Hedley

    (@hedley)

    Thanks very much, Michael! I’l experiment with that.

    H.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable single post view’ is closed to new replies.