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

    (@gwin)

    Hi,
    you can do that with the code below

    
    add_action( "adverts_list_after_title", function( $post_id ) {
      echo rmp_get_visual_rating( $post_id );
    } );
    
    Thread Starter teeboy4real

    (@teeboy4real)

    The display position is not ok i need the rating to be wrapped in a div

    so now i’m trying to override the template file list-item.php but this addon is not working https://raw.githubusercontent.com/simpliko/wpadverts-snippets/master/override-templates/override-templates.php

    I have the new wpadverts folder in my child theme with the modified list-item.php

    Plugin Author Greg Winiarski

    (@gwin)

    The override-templates.php snippet seems to be fine i am testing it right now, where exactly do you have the child-templates file located?

    Thread Starter teeboy4real

    (@teeboy4real)

    this is the new file path (/wp-content/themes/klein-child/wpadverts/list-item.php)

    klein-child is a child theme

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    the override-templates.php file does not support child templates, you would need to either put the wpadverts/list-item.php in your parent theme folder or, in the override-templates.php replace get_template_directory() with get_stylesheet_directory().

    Thread Starter teeboy4real

    (@teeboy4real)

    this get_stylesheet_directory() worked thanks my site now looks awesome

    Thanks so much for your help im really really gratefull.

    Thread Starter teeboy4real

    (@teeboy4real)

    I was wondering why you did not make the override template feature a core feature of wpadverts plugin itself so all a user need to do is simply create a wpadverts folder in either the main theme or child theme for an override to take place.

    Plugin Author Greg Winiarski

    (@gwin)

    I wasn’t sure if this will be a useful feature so i created it as a code snippet, but i am actually thinking about moving it to the WPAdverts core.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display rating in advert list page’ is closed to new replies.