Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #3540974
Post count is sticking to zero
Closed

Comments

  •  7
    guy_marong started the conversation

    Hi,

    I have just recently (today) turned on the "Show Views Count" and "Enable ajax Post View Count" button but it has no effect, the views are still on zero even though I've opened and close several news posts on the news page https://cubic-lighthouse.com/news-cybersecurity/. I've checked other tickets from users but couldn't find a working solution.

  •  2,610
    PenciDesign replied

    Hi,

    For this matter, please provide me with your WordPress admin account credentials. I will log in and attempt to assist you in troubleshooting this issue.

    Regards,
    PenciDesign.


  •   guy_marong replied privately
  •  2,610
    PenciDesign replied

    Hi,

    You should insert this code either into the functions.php file of the child theme or by using the CodeSnippet plugin available here: https://wordpress.org/plugins/code-snippets/

    add_filter('the_content',function($content){
        $views_html = '<span style="display:none"><i class="penci-post-countview-number">'.penci_get_post_views( get_the_ID() ).'</i></span>';
        return $content.$views_html;
    });

    Regards,
    PenciDesign.

  •  7
    guy_marong replied

    Hi,

    unfortuantely, this did not work out.

    Please check attachment.

    Attached files:  screen.jpg

  •  2,610
    PenciDesign replied

    Hi,

    I've added this code snippet for your site.

    Please clear your browser's cache and then recheck.

    Regards,
    PenciDesign.


  •  7
    guy_marong replied

    Thanks. With this kind of support I never worry...:-)

    I'm very happy with this....


    Kind regards ...

  •   guy_marong replied privately
  •  2,610
    PenciDesign replied

    Hi,

    I've checked your site, the problem is that you've deleted the Code Snippet plugin, so the post count doesn't work.

    Regards,
    PenciDesign.


  •  7
    guy_marong replied

    Hi,

    OK, I admit I had to sort out the plugins (we had too many of them) and wasn't aware that removing the Code snippet plugin would also remove the code. Is it not possible to add the code snippet directly to the function.php without a plugin?

    Kind regards ...

  •  2,610
    PenciDesign replied

    Hi,

    Yes. You can copy/paste the code snippet into the functions.php of the child theme.

    Regards,
    PenciDesign.


  •  7
    guy_marong replied

    I know I had tried to insert the snippet into the function.php before but it didn't work out as you can see from the attached screen shot but maybe I was just too dumb to do it.

    Attached files:  screenshot.jpg

  •  7
    guy_marong replied

    OK, I will try again ...

  •  7
    guy_marong replied

    OK, this time it worked...:-)

    Thanks for indicating me in the right direction ....

    Kind regards