- This topic has 42 replies, 5 voices, and was last updated 3 years, 4 months ago by Tom.
-
AuthorPosts
-
December 3, 2020 at 8:57 am #1566088Sourabh
HI,
how to add Post Visit Counter and Mins Read time in each post ??
Regds:
December 3, 2020 at 11:53 am #1566301LeoStaffCustomer SupportHi there,
A plugin like this might help:
https://wordpress.org/plugins/post-views-counter/And you can try something like this for the read time:
https://generatepress.com/forums/topic/see-the-reading-time-in-a-post-page-home/#post-1060767December 4, 2020 at 12:18 am #1566839SourabhNo, 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 ??
December 4, 2020 at 2:03 am #1566912ElvinStaffCustomer SupportHi,
The code from this one is a PHP snippet.
https://generatepress.com/forums/topic/see-the-reading-time-in-a-post-page-home/#post-1060767Here’s how to add PHP – https://docs.generatepress.com/article/adding-php/
As for post visit counters, you can try looking for articles like this but we really can’t guarantee if it’ll work.
https://www.themexpert.com/blog/track-display-post-views-in-wordpressDecember 4, 2020 at 2:17 am #1566923SourabhHi, 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 ??
December 4, 2020 at 9:34 am #1567580DavidStaffCustomer SupportPHP 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.
December 4, 2020 at 9:43 am #1567596SourabhOkay but your answer is half David, I asked where should I find function.php in a child theme, as I tried all in these options but didn’t find one –
https://www.dropbox.com/s/hz21unh5i5x8cnv/function.php.png?dl=0
Make me correct if i am moving wrong…
December 4, 2020 at 9:46 am #1567600LeoStaffCustomer SupportIt would normally be under Appearance > Theme Editor:
https://www.screencast.com/t/0IF0o9naLooks 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.
December 4, 2020 at 10:14 am #1567650SourabhI downloaded a plugin for that and edited function.php and pasted a code here –
https://www.dropbox.com/s/626vyjsuc93p8gd/read%20mins.png?dl=0
But seems it’s not working, should I still missing something ??
December 4, 2020 at 12:19 pm #1567792TomLead DeveloperLead DeveloperThat code adds it to WP Show Posts – is that what you’re wanting?
December 4, 2020 at 7:15 pm #1568012SourabhI want to add read mins time in to all posts without plug-ins..
I use given code but its not working.
December 5, 2020 at 12:01 pm #1568733TomLead DeveloperLead DeveloperThis code you linked to: https://www.dropbox.com/s/626vyjsuc93p8gd/read%20mins.png?dl=0
Does not match the code provided here: https://generatepress.com/forums/topic/see-the-reading-time-in-a-post-page-home/#post-1060767
The code you’re using is for WP Show Posts (not GeneratePress).
The code in that GP post is for GeneratePress.
December 6, 2020 at 6:18 am #1569211SourabhI 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
December 6, 2020 at 12:21 pm #1569615TomLead DeveloperLead DeveloperCan you link us to the page so we can take a look?
December 10, 2020 at 2:24 am #1574041SourabhSure… Refer Private Section
-
AuthorPosts
- You must be logged in to reply to this topic.