How can assign posting to Subscriber to specific category?
Bind user to category This plugin allows you to restrict users to only posting in specfic categories.
Bind user to category This plugin allows you to restrict users to only posting in specfic categories.
your menu is pages oriented. pages have parents and the query asks for the parent and the siblings. When accessing posts, posts have no hirarcy, wp_list_pages will not work and you cannot query posts by parent. The big question is what you’d like to display when accessing a single post… if you want to display … Read more
If retrieve_cat_data_sp is the function from this question then that returns categories except the ones given in the argument: $cat_lists = retrieve_cat_data_sp(’81’); It essentially a wrapper for get_categories. So to exclude multiple Ids $cat_lists = retrieve_cat_data_sp(‘81,82’); If you want to exclude 81 as well as those IDs listed in get_option(‘bn_exclude_home_lists’) then, assuming that option returns … Read more
Try this… <?php function list_post(){ //or you can use the cat id here, check the codex for WP_Query $q = new WP_Query(array(‘category_name’ => ‘<cat slug here>’)); if($q->have_posts()): while($q->have_posts()):the_post(); the_title(); endwhile; else: echo “No posts found!”; endif; wp_reset_postdata(); } add_shortcode(‘list_post’, ‘list_post’); ?>
I would guess link_catetory should be link_category. 🙂
This is a tricky and interesting one. It would be pretty easy to write hardcoded orders for a whitelist of categories, but a true ordering algorithm – which will handle an arbitrary number of categories, and an arbitrary tree depth – requires recursion. What follows probably is not the most efficient solution possible, but it … Read more
Use: get_query_var(‘category-name’); Which will give you: example.com/category/subcategory/my_post Which you can then put into any queries you make under category-name. You can see this in action using the Monkeyman rewrite analyser plugin, by entering one of the URLs for a post and seeing the query variables it generates using those rules
the function wp_insert_term returns the newly created term id (or WP_Error on error), so once your create your term you need to store it’s ID and then you can save the “extra fields” using get_option, update_option something like: if($_SERVER[‘REQUEST_METHOD’] == “POST”) { $clientName = $_POST[“clientName”]; $term_id = $_POST[“clientName”]; $clientKeywords = $_POST[“clientKeywords”]; $clientSlug = $_POST[“clientSlug”]; $parent=””; … Read more
take a look at wp_insert_term which you can use to create your new category ex: wp_insert_term($termName,$taxonomyName); in your case $termName should be the title and $taxonomyName should be category
Yes you can, WP has a build in function to attach a custom taxonomy to a (custom) posttype: http://codex.wordpress.org/Function_Reference/register_taxonomy