Site logo

Archived topic

Post Visit Counter and Mins Read time

42 replies · Started by Sourabh on December 3, 2020

Viewing posts 1–15 of 43

HI,

how to add Post Visit Counter and Mins Read time in each post ??

Regds:

No, I don't want to add a plugin for the post-visit counter hence requested code, I am already aware that I can do with plugins but they create a problem later, so please provide if I can do via code, etc

And for reading time actually, I could not understand which types of codes these are, it's not looking like CSS, if this is PHP, so how to use it ??

Hi, I don't want to load my website with plugins so won't prefer adding PHP using plugins however I use a child theme for generate press so guide me on how to do that ??

where should I find function.php in the child theme??

should I paste codes at the bottom directly and save or is there any specific place ??

PHP Snippets can be added to Child Theme functions.php - you can add them after any other functions you have already in there.

In regards to using plugins - Code is Code, so a well coded plugin will be as performant as any custom code you add. The advantage of using a plugin it comes with Developer support. If you're not a developer yourself then it is far better to use a plugin.

It would normally be under Appearance > Theme Editor:
https://www.screencast.com/t/0IF0o9na

Looks like you don't have that option though and I'd assume it's a permission issue which the theme itself doesn't control.

Try googling "theme editor missing wordpress" to see some debugging tips.

That code adds it to WP Show Posts - is that what you're wanting?

I want to add read mins time in to all posts without plug-ins..

I use given code but its not working.

I was confused after your comments for CSS hence I only replaced "generate_post_author_output" however I have corrected that now, and it's looking like below -

Reading time: 4

Reading time: 2

Reading time: 1

how to make this format correct like below and set it with meta of each post by default-

Format - Reading Time - 5 Mins

Can you link us to the page so we can take a look?

Sure... Refer Private Section

This archived topic is closed to new replies.