User Submitted Posts
[resolved] Is this compatible with version 3.6.1 (6 posts)

  1. rich8
    Posted 2 years ago #

    Hi This plugin looks just what I want - fantastic work, but the http://wordpress.org/plugins/user-submitted-posts/ link says that compatibility is up to 3.5.2 only. However, some people asking questions posted their version as 3.6.1. So I've installed it but it's not forcing the user to login. I've added the line to the theme functions.php

    Is it officially working with 3.6.1 ?

  2. Jeff Starr
    Plugin Author

    Posted 2 years ago #

    Yes the plugin works fine with 3.6.1. The plugin doesn't "force" anyone to log in (or out), that is left to the theme template. It's pretty easy to implement, something like this:

    <?php if(current_user_can('read')) : // user is logged in ?>
    <?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
    <?php else : // user is not logged in ?>
    <p>Please register or whatever</p>
    <?php endif; ?>
  3. rich8
    Posted 2 years ago #

    Which file do I put this code into ?

  4. RaPhiuS
    Posted 2 years ago #

    Hello rich8,

    A clean way to do this is to edit the functions.php in your theme directory and add at the very end the following code:

    add_shortcode( 'forcemember', 'member_check_shortcode' );
    function member_check_shortcode( $atts, $content = null ) {
    	 if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
    		return do_shortcode($content);
    	return wp_register('<strong>To submit a post you should be a registered user, please ','.</strong>');

    After this is done, in any of your pages you could simply use the shortcode created above like this:


    Simple, work and 1 minute fix to do.


  5. rich8
    Posted 2 years ago #

    That solves my problem, awesome, thanks RaPhuiS

  6. Jeff Starr
    Plugin Author

    Posted 2 years ago #

    Thanks for the shortcode RaPhiuS. Closing thread!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Submitted Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.