• Resolved AZanderS

    (@azanders)


    Установил плагин объявлений WP Adverts на
    Вывел последние объявления на главную страницу. Но фото объявлений почему-то не отображается. Подскажите пожалуйста как и где исправить, чтобы на главной странице в выводе последних объявлений, отображались фото самих объявлений.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    it seems you are displaying the Adverts using some other plugin or using a feature in your theme.

    In this case most likely to have the images displayed on the home page for each Advert you would need to have one image marked as featured, to do that:

    1. Enable featured images for Adverts, you can do that by adding the code below in your theme functions.php file

    
    add_action("adverts_post_type", "enable_adverts_thumbnails");
    function enable_adverts_thumbnails( $args ) {
      $args["supports"][] = "thumbnail";
      return $args;
    }
    

    2. For each Ad you would need to select a main image in the gallery, to do that after uploading an image edit it and check the featured checkbox

    3. (optionally) if you want to be sure that each Ad will have the main image selected you can use the Force Featured Image snippet https://github.com/simpliko/wpadverts-snippets/blob/master/force-featured-image/force-featured-image.php

    How to use the snippet you can read here https://github.com/simpliko/wpadverts-snippets/ at the bottom of the page.

Viewing 1 replies (of 1 total)
  • The topic ‘Вопрос по WP Adverts’ is closed to new replies.