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

    (@gwin)

    Hi,
    currently we are not using the category descriptions, to have them displayed on advert category pages, you would need to open file wpadverts/templates/list.php and add there following code

    
    <?php if( isset( $params["category"] ) ) echo term_description( $params["category"], "advert_category") ?>
    

    also consider creating child template file for list.php so your chages will not be overwritten on WPAdverts update. https://wpadverts.com/documentation/child-themes-and-templates/

    Thread Starter amitbh01

    (@amitbh01)

    Hello Greg,

    Many Thanks for the prompt reply!!
    I have added the code under wpadverts/templates/list.php but nothing happened. I am using Twenty Sixteen theme

    Many thanks to you for this wonderful software…
    Amit

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, this code should work regardless of theme you are using, but i tried it with twentysixteen just to be sure and it seems to be working fine for me.

    Note that this will work only when browsing by category that is when you are on a page like https://demo.wpadverts.com/advert-category/video-games/

    Thread Starter amitbh01

    (@amitbh01)

    Hello Greg,

    But its not working for me. Is there any other way or any other plugin to do this?
    Can you please help me how to display 3 ads in a row on category pages..?
    By default its 2 ads in a row:
    https://www.anshexports.com/advert-category/absolute-oils/

    Many thanks,
    Amit

    Plugin Author Greg Winiarski

    (@gwin)

    1. you can set 3 items per row in wp-admin / Classifieds / Options / Core panel in the default settings for [adverts_list].

    2. i am not sure why the category description does not display for you does anything at all display there? for example if you enter “??” will this show on advert category pages?

    I did it, thank you for this

    how to display sub-categories in the main category?

    • This reply was modified 8 years, 3 months ago by alexpetrov.
    • This reply was modified 8 years, 3 months ago by alexpetrov.
    Thread Starter amitbh01

    (@amitbh01)

    Hello Greg,

    Thanks a lot for all your kind support. Yes its done now…
    Advert cat description is visible on front side.

    Regards,
    Amit

    Plugin Author Greg Winiarski

    (@gwin)

    @alexpetrov the [adverts_categories] nor category pages cannot display sub-categories right now, the only way to do that is to use the Adverts Categories widget which can display sub-categories for currently displayed category page.

    Greg, add in the next updates

    <h2 class="categoryTitle"><?php if(category_description() != ""){single_cat_title();} ?></h2>
    <?php if( isset( $params["category"] ) ) echo term_description( $params["category"], "advert_category") ?>
    Plugin Author Greg Winiarski

    (@gwin)

    I will probably make it possible to display the description using some hook / filter, this will not go into default version as it would show the description on other users websites who might not want to have it.

    @gwin, if you add in a plugin that nothing terrible will happen, just who does not want to let does not populate the description column. I use a translator

    Plugin Author Greg Winiarski

    (@gwin)

    Ok, i most likely will include this in the next update.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to display description on advert category page’ is closed to new replies.