Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




wp_dropdown_categories on pages/posts

UserPost

8:13 pm
March 28, 2011


in2dwww

Member

posts 6

1

I would like to create a page where logged in users can submit a post.  Sort of like a tweet from twitter, but in wordpress.

The form is simple and only has fields for: title, content, category.

I'm trying to implement something like this in a page:

http://voodoopress.com/2011/03/how-to-post-from-your-front-end-with-no-plugin/

For some reason, even when using <?php wp_dropdown_categories( $args ); ?> as defined in the WP Codex, role scoper is not restricting categories to the logged in users.

Is role scoper able to limit <?php wp_dropdown_categories( $args ); ?>

I noticed that role scoper supports the quick post widget, but I need to include a form in the content of a page, not in a widget sidebar.

Also, to use php within posts/page content, I'm using the exec-php plugin. 

Can anyone provide insight?

3:06 pm
March 31, 2011


Kevin

Admin

posts 2503

2

There has to be a way of telling Role Scoper to filter the categories for editing instead of viewing. For now, try including name=quick_post_cat in your args.

5:31 pm
March 31, 2011


in2dwww

Member

posts 6

3

Kevin said:

There has to be a way of telling Role Scoper to filter the categories for editing instead of viewing. For now, try including name=quick_post_cat in your args.


That works!  I have tested by adding the following into a page (I also have exec php plugin enabled):

<?php wp_dropdown_categories('name=quick_post_cat'); ?>

Users restricted to certain categories are only able to see their assigned categories in this drop-down list.

10:07 pm
March 31, 2011


Kevin

Admin

posts 2503

4

Now just make sure your other code uses that name.


About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin