Articles of admin

paginate_links on custom query in admin – 'sufficient permissions' error

I have created a page in my admin with this custom query: $rows = $wpdb->get_results(“SELECT * FROM ej_feedback ORDER BY createdtime ASC”); I have made it successfully paginate as required in that the right amount of posts show on first page and the right amount of pagination links show up. Awesome! However when I click […]

Simply poll & Events Calendar plugins clashing

I’m using two plugins that seem to clash: http://wordpress.org/extend/plugins/simply-poll/ http://wordpress.org/extend/plugins/the-events-calendar/ When both activated only the poll plugin shows in the admin menu but when it’s deactivated the calendar plugin shows in it’s place. Is there a way to get both plugins working together as they’re exactly what I need. I’m running the latest version of […]

/wp-admin/install.php redirecting to 123-reg

This is my first time installing wordpress via FTP, and the first time to an existing host and domain (I normally use EvoHosting, since it’s automatic) I’ve gotten to the stage where I’m heading to /wp-admin/install.php, but it’s redirecting to the host – 123-reg.co.uk I’m trying to figure out where I went wrong. I’ve installed […]

retain querystring values when savincustom options in admin

Quick question, I have a custom options page which posts to options.php, however I have a few sections to my options page where i change the post url like so: <form action=’options.php?section=sectionname’ ..> when the options page reloads I need to check which section was just saved i.e. get the sectionname from the querystring, however […]

WordPress custom admin functions security

i have a case in my admin panel where i need to call my own function that resides in my own php file, with a GET request. This function is actually removing entries from the database. So, i would like to make sure that this cannot be invoked from anybody else than the admin user. […]

Get categories names as an array to use it in theme settings

I am building a theme and for the Theme Settings Page I followed this tutorial: http://wp.tutsplus.com/tutorials/using-the-settings-api-part-1-create-a-theme-options-page/ What I want now is to have a multi-checkbox with every category. This is what I should have: $options[] = array( “section” => “zzz”, “id” => HS_SHORTNAME . “_multicheckbox_inputs”, “title” => __( ‘Multi-Checkbox’, ‘hs_textdomain’ ), “desc” => __( ‘Some […]

How to check if post/page or taxonomy post is published by admin

Example :- 10 users and 2 admin in a site. If the post is published by admins than <?php ?????() { ?> <!– do this –> <?php } else { ?> <!– do this if posted by user –> <?php } ?>

How to reset a custom theme

After making a lot of little changes to the current custom theme [zeeBizzCard] I’m using, I want to reset it back to it’s original style. Being new to WP, I didn’t make a backup of the default theme and can not find a quick and easy method of reseting the theme. Have I missed something, […]

creating a plug in that would tap into save/update action of posts

What’s a good plug-in that taps into the update post or save post action that allows admins to enforce rules such as if a user selects a category with the ID 5 then he also has to select at least one category from the the XYZ custom taxonomy etc – or that update/save won’t go […]

Filter WooCommerce Orders

I am using woocommerce for a “multi-seller” system. Meaning one site (no multi-site), but many sellers with different products. To let each owner only manage it’s own orders, it would like to filter all orders before they are shown in the admin area. The criteria for filtering could be a tag or the creator of […]