Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author WebberZone

    (@webberzone)

    This is a new feature coming in the next version of the plugin. It’s currently a WIP and several weeks away.

    Thread Starter martinavive

    (@martinavive)

    is there any temp way for this to be implemented?

    Plugin Author WebberZone

    (@webberzone)

    Yes. You can replace:

    if ( current_user_can( 'manage_options' ) ) {

    with

    if ( current_user_can( 'edit_posts' ) ) {

    in admin/admin-metabox.php
    https://github.com/WebberZone/top-10/blob/master/admin/admin-metabox.php#L69

    Thread Starter martinavive

    (@martinavive)

    This does not work, actually causes wp-admin to be inaccessible

    Plugin Author WebberZone

    (@webberzone)

    Could you please confirm that all you’re changing is ‘manage_options’ on this line with ‘edit_posts’ in that specific line?

    Just changing this shouldn’t make wp-admin inaccessible.

    Thread Starter martinavive

    (@martinavive)

    HI, ok i changed the right file and the counter now visible but after update the figure which i changed in top 10 views within post does not it reverts back to original figire

    Plugin Author WebberZone

    (@webberzone)

    Does this happen irrespective if the user is an admin or a non-admin/

    Thread Starter martinavive

    (@martinavive)

    Only non admin

    Plugin Author WebberZone

    (@webberzone)

    Thanks for confirming. I need to do more testing around this.

    Thread Starter martinavive

    (@martinavive)

    Thanks, any update on this?

    Plugin Author WebberZone

    (@webberzone)

    Hi,

    I just ran a check on my site. The easiest way to get this to work is to actually delete

    if ( current_user_can( 'manage_options' ) ) {

    and the closing bracket soon after

    if ( current_user_can( 'manage_options' ) ) {
    ?>
    	<p>
    		<label for="total_count"><?php _e( "Visit count:", TPTN_LOCAL_NAME ); ?></label>
    		<input type="text" id="total_count" name="total_count" value="<?php echo $total_count ?>" style="width:100%" />
    		<em><?php _e( "Enter a number above to update the visit count. Leaving the above box blank will set the count to zero", TPTN_LOCAL_NAME ); ?></em>
    	</p>
    
    <?php
    	}
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how to give author user permission to access’ is closed to new replies.