Do not show default image on listing detail page

This topic contains 4 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #489004

    vivek
    Full Member
    Post count: 246

    Hi, I want to be able to show category/CPT default images on archive pages (as otherwise page will look odd, misaligned if some items have image and some dont), but i only want to show image in the detail page IF there is an image uploaded for the post, and do not show the default cpt/category image on the detail page- as it does not add any value there.

    Any advice on i can achieve this?
    thanks,
    Vivek

    #489005

    Alex Rollin
    Moderator
    Post count: 27815

    You would need some custom code to achieve that, unless you wanted to use a different image custom field for your listing images.

    #489030

    vivek
    Full Member
    Post count: 246

    Ah – that may work- let me give that a try!
    Thanks Alex!

    #494478

    vivek
    Full Member
    Post count: 246

    Hi Alex- was just working on this, and am a little confused. The custom field “Images” is the regular image field (key: post_images), right? the one that is displayed using [gd_post_images types=”post_images”]

    So how do i add a custom image field? did you mean a file upload custom field (key = cust_img) with file formats selected as jpg and then usingg [gd_post_meta] to display that image?

    Can i then use this (cust_img) type in the archive item as [gd_post_images types=”cust_img,logo) – then i will actually not be using the “post_images” field at all

    I guess im getting confused by post_images field and post_images display shortcode…

    #494565

    Alex Rollin
    Moderator
    Post count: 27815

    https://wpgeodirectory.com/docs-v2/integrations/images/#comment-images
    Yes, like types=”my-image-field,post_images” would show a custom field first, then the built in images field.

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket