gandj
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: How to get post ID?Below is the exact code to get it in the array format,
<?php $cat = 47; //category id $posts=get_posts('showposts=-1&cat='. $cat); if ($posts) { $cat_post_ids = array(); foreach($posts as $post) { array_push($cat_post_ids, $post->ID); } print_r($cat_post_ids); } ?>Forum: Fixing WordPress
In reply to: Calendar widget – how to display posts from specific category only?hey guys, is any one found the solution to display the default calendar widget only for a specific category posts?
Forum: Fixing WordPress
In reply to: How to list authors?Hey MichaelH,
Better you should use this below code instead of checking the staic condition by user_id is 1.
Since you might have more than one admin also on your blog.
$isadmin = $wpdb->get_results("SELECT count(*) as count from $wpdb->usermeta WHERE user_id = $user->ID and meta_value=10"); if ($isadmin[0]->count == 0 ) { //uncomment next line to see all values //echo " <pre>"; print_r($user); echo "</pre> "; echo 'User ID ' . $user->ID . ' ' . $user->user_firstname . ' ' . $user->user_lastname ; }Forum: Plugins
In reply to: [Plugin: User Access Manager] Categories on “Add new post” page disappearHey Alex,
Its again raising the same posting issue. i.e non-admin / non-authorised users also can post to any categories.
I am using WP 2.9.2 and UAM 0.9.1.3. Both are update to date. Looking forward your response.
Viewing 4 replies - 1 through 4 (of 4 total)