how can we bring category metabox to Media Library/Upload New Media Page
there was a question very similar to this which as a simple answer which then turned in to a plugin “WOS Media Categories WordPress Plugin“.
there was a question very similar to this which as a simple answer which then turned in to a plugin “WOS Media Categories WordPress Plugin“.
“Post Format” is simply a custom taxonomy, and it is – by design – not extensible. I would recommend just implementing this procedurally, by only using specific tags with specific Post Formats. EDIT I would start with the Codex entry on Post Formats. Here’s a little primer I wrote on using Post Formats as a … Read more
From you are describing, it might be worth investigating custom-post types. You can actually create a separate menu tab on the left column – ergo separate your posts accordingly in a similar layout as Posts. http://codex.wordpress.org/Post_Types
Goto your respective page template file, default is page.php and the following code <?php if (is_page(‘Food’)) { $catID=11; } elseif (is_page(‘Cooking’)) { $catID=12; } ?> To get the category ID, navigate to dashboard>posts>categories> Click on the respective category, and see the url, it must be something like this wp-admin/categories.php?action=edit&cat_ID=11 take the value of cat_ID in … Read more
You don’t need to hook the dw_get_category() function. Simply do it like this: function dw_get_category() { global $post; $categories = get_the_category($post->ID); if ( $categories ) { foreach ($categories as $category) { $dw_category_slug = $category->slug; $dw_category_name = $category->name; } } else { $dw_category_slug = ‘utopia’; } $dw_category = array(‘name’ => $dw_category_name, ‘slug’ => $dw_category_slug); return $dw_category; … Read more
Hook template_redirect and check if it’s a category archive page, if so get the category ID from query_vars and query_posts for a single post from that category, which by default should be the most recent, then wp_redirect to the post’s permalink. This code would go in your theme’s functions.php file: function my_category_redirect() { if ( … Read more
save the main current post id into a variable and compare it in the loop with the current post id; example: <?php $this_post = $post->ID; ?> <?php $temp_query = $wp_query; ?> <?php foreach(get_the_category() as $category) { $cat = $category->cat_ID; } query_posts(‘orderby=date&cat=” . $cat . “&order=desc&posts_per_page=-1’); while( have_posts() ) : ?> <span<?php if( $this_post == $post->ID … Read more
You can create a new page template, and in that template put: <?php wp_get_archives(‘type=postbypost’); ?> This will list every one of your posts by post date. (Reference: wp_get_archives)
try: <?php $cat_to_EXCLUDE = 50; $cate_id = retrieve_cat_data(true); $cate_name = retrieve_cat_data(false); for ($i = 0; $i < count($cate_name); $i++ ) { ?> if ($cate_id[$i] != $cat_to_EXCLUDE){ <option value=”<?php echo $cate_id[$i]; ?>”><?php echo $cate_name[$i]; ?> </option><?php }} ?> update: if you search your theme’s functions.php file i bet you will find a function named retrieve_cat_data anyway … Read more
I’ve tried quite a few plug-ins to restrict user access. The best that I’ve found is the Members Plug-in by Justin Tadlock. You can download it here: http://wordpress.org/extend/plugins/members/ Source: WordPress as a CMS Membership website The plug-in allows you to restrict access to individual posts, possibly by categories, but I don’t see the setting after … Read more