• Resolved Drivingralle

    (@drivingralle)


    Hey!

    The flexibility of the plugin allows a lot of use cases. I like that.
    Just tried it one of mine. We want to display reviews that get stored in a custom post type. This CPT is hidden aka. ‘publicly_queryable’ => false in register_post_type(). That mean the review doesn’t have a single view.

    The block manages to display the reviews nicely. The only downside is that the items are wrapped in anchors even if the item doesn’t has a single view. Leading to a dead link and a bad UX.

    Could you run a check if a post is publicly_queryable before the anchor tag is added?
    Or less preferred a setting inside the block. Prefer automation over settings.

    Greetings
    derRALF

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ronald Huereca

    (@ronalfy)

    Thread Starter Drivingralle

    (@drivingralle)

    The latest version works in most parts.
    Like that the read-more link is hidden even if the toggle is set to “Display Continue Reading Link” this prevents a lot of user confusion.

    Only the featured image is still linked to the not existing single view.

    Greetings
    derRALF

    Realise I am responding 5 months after this was posted, but thought I would share how I solved this in case it is helpful to you or anyone. I an using this plugin to display testimonials and had the same issue re: not being able to prevent the featured image (attempting to) Link to single view.

    Feels a little hacky admittedly, but I was able to solve this easily enough with only CSS by adding a pseudo element as an invisible overlay that prevents clicks.

    .posts-list.testimonials * {
    	cursor: default!important;
    }
    
    .posts-list.testimonials article .ptam-block-post-grid-text {
             z-index: 10;
    }
    
    /* Invisible pseudo-element prevents clicking on links in featured image which cannot be removed  */
    .posts-list.testimonials .ptam-block-post-grid-image:before {
    	content:"";
    	position: absolute;
    	top:0;
    	left: 0;
    	height: 100%;
    	width: 100%;
    	z-index: 5;
    	background-color: transparent;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Better support for hidden post types’ is closed to new replies.