Forums

Write to post by logged in users (2 posts)

  1. venug
    Member
    Posted 1 year ago #

    I just installed a theme which needs right to post by a logged in user.The theme 's guide suggested me to paste this code in functions.php

    function quality_ticket_creation_cap()
    {
    	if( current_user_can( 'read' ) )
    		return true;
    
    	return false;
    }

    But it is not working proper if I use that code. It is working if remove if( current_user_can( 'read' ) )

    and enable every user to post using this :

    function quality_ticket_creation_cap()
    {
    	return true;
    }

    But what should I do If need only the logged in users to post?

    Thanks !

  2. venug
    Member
    Posted 1 year ago #

    Sorry for the mistake in title.It is actually "Right to post by logged in users " .

Topic Closed

This topic has been closed to new replies.

About this Topic