Hot answers tagged page-template
Source You can use locate_template to find the template file to include. Bit cleaner than using globals. Ie require(locate_template('messages'));
What I would advice, and have done myself when making WordPress sites for clients. Create a custom post type that they can’t get access to. You can achieve this by conditionally removing the post type from the admin sidebar. One of the ways to solve that problem is to add a custom capability to the user(s) that you would like to allow editing these critical ...
This is not working and also I don't know how can I get the comments of the current user. You have already used the current user's ID in your code... echo 'User ID: ' . $current_user->ID; ... but you hard-code a single ID in the get_comments argument array. Don't do that. Use the current user ID. $args = array( 'user_id' => ...
Only top voted, non community-wiki answers of a minimum length are eligible