• Resolved 012kal

    (@012kal)


    Hello,

    I currently use the Newspaper theme and its Post Views Count feature included.

    I want to use the plugin “Post Views Counter” for the starting account the calculation of the number of views of the theme and the importer the number of views of The Post Views Count function of NewsPaper in the data of the “Post Views Counter” plugin.

    You explains the procedure in this code:

    Function custom_pvc_import_meta_key ($ meta_key) {
    // Use your meta-key here
    Back to "my_post_views";
    }
    Add_filter ('pvc_import_meta_key', 'custom_pvc_import_meta_key');

    I think the Newspaper meta_key is: post_views_count.

    I did the tests, but the import does not work.

    Did I go wrong “meta_key”?

    Thank you for your help!

    • This topic was modified 8 years, 1 month ago by 012kal.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dFactory

    (@dfactory)

    If you’re sure ‘post_views_count’ is the correct meta key and it stores total views for a post then yes – paste the code below into functions.php of your current theme and then use Import in PVC settings:

    function custom_pvc_import_meta_key( $meta_key ) {
    	// Use your meta-key here
    	$meta_key = 'post_views_count';
    	return $meta_key;
    }
    add_filter( 'pvc_import_meta_key', 'custom_pvc_import_meta_key' );
    Thread Starter 012kal

    (@012kal)

    Hello @dfactory

    Thank you for your quick and effective response!

    I inserted as you advised, but there is no change.

    The meta key is correct according to the theme designer.

    Is it possible to intervene on my website?

    If possible, what are your requirements?

    Thank you

    Plugin Author dFactory

    (@dfactory)

    Please reach our forum and create a new thread. We’ll try to check it.

    Thread Starter 012kal

    (@012kal)

    Ok @dfactory

    Thank you

    hi,

    how did work?

    I am using the same theme and it does not count views with caching plugins.

    Thread Starter 012kal

    (@012kal)

    @recons
    This did not work for me, I was forced to remove the theme and manage my Post Views independently of the theme with the Post Views Counter plugin. From now on, I will keep them separate, because I am obliged to update everything manually.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Import “Theme native Post Views” into “Post Views Counter”’ is closed to new replies.