Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1428742

    Hello, is it possible to add somewhere to the combo widget, in the class-avia-combo.php to add a function pvc_post_views( $post_id = 0, $echo = true ); To show post views below the post title?

    Thank you

    • This topic was modified 11 months ago by nebuddlho.
    #1428802

    Hey nebuddlho,
    Is this for the Post Views Plugin? You can edit the class-avia-combo.php file but you will need to do so after each update as this file can’t be added to the child theme.
    I’m not sure if this specific code will work and this plugin looks like a paid plugin so I’m not able to test. We are limited to our support for third party plugins, if the code doesn’t work for you try asking the plugin author, most paid plugins offer some support.

    Best regards,
    Mike

    #1428841

    Well – there is a free version too – but i can not say if this is the plugin you use.
    For a customer – long time ago – i edited the postslider.php to insert the counter into meta info of a post.
    But I would have to think my way back into it first; the version of postslider.php I still have saved here is from 2020
    maybe loop-index.php should also be edited.

    i think only a code like this :

    number_format_i18n(pvc_get_post_views( $the_id ))
    

    had to be inserted to the $meta.

    F.e. open loop-index.php and find around line 431:
    $meta_seperator = apply_filters( 'avf_post_metadata_seperator', '<span class="text-sep">/</span>', 'loop-index' );

    place just under that line:

    $meta_postviews  = "<span class='post-views' title='Calls for: ".get_the_title( $the_id )."'><span class='post-views-icon dashicons dashicons-businessperson'></span>".number_format_i18n(pvc_get_post_views( $the_id ))."</span>";
    $meta_info['postviews'] = $meta_postviews;

    upload that edited loop-index.php to a child-theme folder : includes

    see how it looks like ( after a short css )
    https://weber.tips/clock/

    #1428843

    Hi,

    Please see @Guenni007’s post.


    @Guenni007
    Thanks as always :)

    Best regards,
    Yigit

    #1428845

    for combo widget i had to look into the code now …
    … guess – as mike said no child-theme working solution. – you had to place the widget from the plugin itself.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.