Articles of wp admin

Custom Columns WordPress Admin

I am just about finished creating custom columns through the WordPress admin panel. The custom post type I am using is called “slides”. I figured out how to add the column titles and all of the column content (because they’re WordPress defaults)…what I am missing is how do I add content to the “thumbnail” column? […]

Odd /wp-admin/admin-ajax.php entries showing in Wassup

I have an odd issue going on that I’m not sure how to troubleshoot. Ever since I installed a popular post plugin (WordPress Popular Posts) I have been seeing a strange entry in Wassup real time analytics to a page called /wp-admin/admin-ajax.php over and over again. Before I installed the plugin it would show the […]

Admin Subpages without Menu entry

I have added some pages to the WP-Adminmenu, with add_menu_page and add_submenu_page. The URLs for those pages look like admin.php?page=my-plugin/admin/submenupage.php. If I try to add a page now that has isnt registered to the menu and link to it with <a href=”?page=my-plugin/admin/add.php”> I’m getting a permissions error. Is there a way to add pages to […]

Fast publishing in wordpress

Wodpress editor is too slow. How to create other faster interface or how to fast publish posts. I just need fileds for author, category and subtitle. Is there any way instead of default wordpress editor ?

Auto create post title in admin

I want to be able to generate titles automatically for a certain custom post type in WP admin. Been looking for a solution but I’m not sure if I’m headed in the right direction by adding this hook – add_filter(‘the_title’, ‘cpt_title_filter’); function cpt_title_filter($title) { global $post; if ($post->post_type == ‘time’) { $title = ‘sample headline’; […]

firing function at login within class

I’ve got a function that I’m trying to fire at wp_signon (grabs data from a remote server and updates accordingly). I’m running the function within a class that is on a secondary file in a plugin (i.e. brought in with a require_once). For the life of me, I cannot get this function to run at […]

Prevent Admin gui output from page added using add_submenu_page

I have created a download link for my plugin using add_submenu_page. When the link is clicked it gathers some files into a zip, then outputs the contents to the browser like so: header(‘Content-Type: application/zip’); header(‘Content-Length: ‘ . filesize($file)); header(‘Content-Disposition: attachment; filename=”file.zip”‘); readfile($file); unlink($file); The issue is that wordpress by default wraps everything in it’s admin […]

Link blogname and blogdescription to the Options Framework

I’m putting together a Theme Options page, where the user(s) I’m building this for would like to be able to edit a few settings directly from this page, including of which – the Site Title and Tagline. With some fantastic help from brasofilo, I have the following… /inc/options-framework.php: /** * Validate Options. * * This […]

displaying an error before update_post_meta

I’m trying to restrict how many items you can associate with a post so in my save function I have: add_action( ‘save_post’, array( $this, ‘save_custom_items_data’ ), 10, 2 ); public function save_custom_items_data( $post_id, $post ) { if(count($related_items) > 5) { // display error message here but the page redirects anyway… } else { update_post_meta( $post_id, […]

How can I limit page parent dropdown to show only author's own pages?

I’m trying to get the page parent dropdown (in page attributes) to show only pages that have been published by the author of the current page. This doesn’t seem to work : add_filter( ‘page_attributes_dropdown_pages_args’, ‘mwm_show_only_author_pages_in_attributes’ ); add_filter( ‘quick_edit_dropdown_pages_args’, ‘mwm_show_only_author_pages_in_attributes’ ); function mwm_show_only_author_pages_in_attributes( $args ) { global $post; $args[‘author’] = $post -> post_author; return $args; } […]