• Resolved kecsula

    (@kecsula)


    It’s possible disable image on the advertising list? If an image is not charged to the advertising an empty image appears in the list. If it is not possible, how can I set default image?

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

    (@gwin)

    Hi,

    are you using the [adverts_list] shortcode or the Classifieds List block?

    With the block, you can edit from the wp-admin / Pages panel the page with the block and in the block options disable showing the image (by switching the “show image column/row” toggle.

    With shortcode you would need to hide it with a CSS code but in order to tell what the CSS for that should be i will need you to email me a link to this page first.

    Thread Starter kecsula

    (@kecsula)

    Hi,

    Thanks for your quick answer, the CSS is a good idea. The display: none is works fine. I have a question yet. On the main page is an adverts category list. When someone clicks on a category, a dynamically generated list of results opens. Is it possible to add a back button to this dynamically generated page that takes me back to the main page?

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,

    it is possible to do this using the adverts_sh_list_before action, for example you can add the code below in your theme functions.php file

    add_action( "adverts_sh_list_before", function( $params ) {
      if( is_tax( "advert_category" ) ) {
        echo '<a href="#">Go Back</a>';
      }
    } );

    Just change # to actual URL you would like users to go back to.

    Thread Starter kecsula

    (@kecsula)

    Hi,

    I tried your script but it doesn’t work.
    I made a demo website for this: https://devel.infora.hu/
    On the main page is an adverts category list with short code:

    [adverts_categories show=”all” sub_count=”5″ columns=”2″ show_count=”1″]


    I added the following code to the theme fuction.php file:

    add_action(
    “adverts_sh_list_before”, function( $params ) {
    if( is_tax( “advert_category” ) ) {
    echo ‘Go Back‘;
    }
    } );

    When I click on a category (e.g. search-computer) on the main page, the search result page opens, but the Go Back button does not appear.

    • This reply was modified 1 year, 10 months ago by kecsula.
    Plugin Author Greg Winiarski

    (@gwin)

    Hi,

    ohh i see you are using the blocks for the category pages, in this case, you will need to display the go-back button using a different hook

    add_filter( "adverts_tax_post_content", function( $c ) {
      return '<a href="#">Go Back</a>' . $c;
    });
    Thread Starter kecsula

    (@kecsula)

    Thanks for everything, this works fine.
    The support you provide for the plugin is great!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to disable image on the adverts list’ is closed to new replies.