[Resolved] Post Visit Counter and Mins Read time

Home Forums Support [Resolved] Post Visit Counter and Mins Read time

Home Forums Support Post Visit Counter and Mins Read time

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
    Posts
  • #1566088
    Sourabh

    HI,

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

    Regds:

    #1566301
    Leo
    Staff
    Customer Support

    Hi 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-1060767

    #1566839
    Sourabh

    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 ??

    #1566912
    Elvin
    Staff
    Customer Support

    Hi,

    The code from this one is a PHP snippet.
    https://generatepress.com/forums/topic/see-the-reading-time-in-a-post-page-home/#post-1060767

    Here’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-wordpress

    https://blog.hubspot.com/website/wordpress-post-views

    #1566923
    Sourabh

    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 ??

    #1567580
    David
    Staff
    Customer Support

    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.

    #1567596
    Sourabh

    Okay 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…

    #1567600
    Leo
    Staff
    Customer Support

    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.

    #1567650
    Sourabh

    I 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 ??

    #1567792
    Tom
    Lead Developer
    Lead Developer

    That code adds it to WP Show Posts – is that what you’re wanting?

    #1568012
    Sourabh

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

    I use given code but its not working.

    #1568733
    Tom
    Lead Developer
    Lead Developer

    This 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.

    #1569211
    Sourabh

    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

    #1569615
    Tom
    Lead Developer
    Lead Developer

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

    #1574041
    Sourabh

    Sure… Refer Private Section

Viewing 15 posts - 1 through 15 (of 43 total)
  • You must be logged in to reply to this topic.