-
AuthorPosts
-
December 22, 2023 at 12:08 pm #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.
December 23, 2023 at 4:15 pm #1428802Hey 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,
MikeDecember 24, 2023 at 6:12 am #1428841Well – 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/December 24, 2023 at 9:35 am #1428843December 24, 2023 at 10:55 am #1428845for 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. -
AuthorPosts
- You must be logged in to reply to this topic.