Search Results for 'Hide Admin'
-
Search Results
-
I’ve been trying to get my admin theme panel gui working so that my users can select from a list of their categories, in order to choose which categories to exclude from the homepage loop.
I believe that I am very close, but can’t seem to get the output correct.
Here is where I am:
I have the following code inside my theme functions file admin panel
// CUSTOM LOOP (homepage)
function category_loopes($options) {
$cats = get_categories('hide_empty=0');
foreach ($cats as $cat) {
$options[] = array( "name" => $cat->cat_name,
"desc" => "Check this box if you wish to exclude this category of articles from the homepage display",
"id" => "zoo_cat_box_".$cat->cat_ID,
"std" => "",
"type" => "checkbox");
}
return $options;
}I then have the ‘selector’ code as:
$options[] = array( "name" => "Homepage Categories to Exclude from homepage articles",
"type" => "heading");
$options = category_loopes($options);Ok so far so good…
What this gives me is another panel in my wp theme admin where it actually lists the categories properly, with a checkbox next to each one.
The user is able to select the categories to exclude and they are saved.
The database has entries in the options table like:
zoo_cat_box_4 true
zoo_cat_box_3 false
Perfect… so i am getting a true in the database for each category to exclude, so far so good.
The problem:
I have to modify the homepage loop to exclude those categories, that part is not working.. Here is the function I am trying for that.
// Custom loops
function get_exclude_categories_loop($labelz) {
$labelz = "zoo_cat_box_";
$include = array();
$counter = 0;
$cats = get_categories('hide_empty=0');
foreach ($cats as $cat) {
$counter++;
if ( get_option( $labelz.$cat->cat_ID ) == 'true') {
$excludecats[] = $cat->cat_ID;
}
}
if(!empty($excludecats)){
$excludecats = implode(',',$excludecats);
}
return $excludecats;
}Finally I place the following on the homepage:
<?php {
$args=array(
'paged'=>$paged,
'category__not_in' => get_option('get_exclude_categories_loop'),
);
};
query_posts($args);
if (have_posts()) : while (have_posts()) : the_post();
?>What is happening is that I am seeing all the posts from all the categories on the homepage. It is not excluding the ones I wish it to.
I’m guessing that something is either wrong with my final function, or I am not filtering the loop properly.
Would a code ninja mind taking a peek?
(I know this is not bp related, more wp, but once I learn this, I plan on using the same logic to exclude bp groups from the listings)
sorry for such a long post, I’m really trying hard to learn this stuff the right way….
Reading over this post http://www.antezeta.com/blog/top-wordpress-security-tips I came across point 3:
3. Change the default Admin Account user from “adminâ€
My question is, HOW do I keep this new, supposed secret, admin account from appearing on the member list?
Topic: hide body of message
Topic: Hide default BP 1.2 Theme
Does any one know how to hide default BP 1.2 from appearing in user admin area?
I need to hide ‘all’ content from unregistered users but I am kind of struggling with that. I have already installed the privacy component ( Thanks for suggesting Brajesh) but it only allows each user to set their privacy settings. I can’t hide all content by default as the administrator. I also tried the Members Access plugin but it does not work at all for me and the Members Only plugin unfortunately does not work in combination with Theme my Login
It does force you to login to see the page but you can still visit all profiles, groups etc. Is there a way to hide all content underneath the header and display a login/registration form instead? I believe there is no plugin so far … would that be quite simple to do or does it require major hacks?
Thanks !!
PHP Strict Standards: Non-static method BP_Groups_Group::get_group_extras() should not be called statically in /var/www/vhosts/farmvillechicken.com/httpdocs/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php on line 351, referer:
'').$rfpclass;