Error after installing the WordPress plugin updates
The easiest way to disable a plugin when there is no access to admin, is renaming of plugin folder. Connect via ftp by Filezilla or use cpanel.
The easiest way to disable a plugin when there is no access to admin, is renaming of plugin folder. Connect via ftp by Filezilla or use cpanel.
Try this, assuming that job_posting_access is a valid hook defines by some plugin: add_action( ‘job_posting_access’, function() { // $pages is Page ID, title, slug, or array of these for which access is restricted $pages = ( array (‘page 1’, 42, ‘page-2′) ); if ( ! current_user_can( ’employer’ ) && is_page( $pages ) ) wp_die(‘<div class=”job-manager-error”>Sorry, … Read more
Taxonomy counter on Taxonomy List(plugin)
The the code below: if(!class_exists(‘ce_add_scripts’)){ class ce_add_scripts{ function __construct(){ add_action(‘admin_init’, array(&$this,’ceas_admin_init’)); add_action(‘admin_menu’, array(&$this,’ceas_admin_menu’)); add_action(‘wp_head’, array(&$this,’ceas_wp_head’)); add_action(‘wp_footer’, array(&$this,’ceas_wp_footer’)); } function ceas_admin_menu(){ add_submenu_page( ‘tools.php’, ‘CE Add Scripts’, ‘CE Add Scripts’, ‘update_plugins’, ‘ceas_menu_page’, array(&$this,’ceas_page_callback’) ); } function ceas_admin_init(){ $args= array( ‘type’=>’string’, ‘default’=>NULL,); register_setting( ‘ceas_options’, ‘ceas_main_settings’, $args); add_settings_section( ‘ceas_options_section’, ‘Insert Scripts to Head or Footer’, array(&$this,’ceas_section_display’), ‘ceas_menu_page’); add_settings_field( ‘ceas_options_field_0’, … Read more
function bulk_search() { $redirect_to = add_query_arg( array( ‘s’ => urlencode($_POST[‘s’]) ), $_POST[‘_wp_http_referer’]); wp_redirect( $redirect_to ); exit(); } Realised by adding urlencode() function would do.
Scheduled cron event removed from list automatically after sometime
As per my understanding, you want to remove WP admin bar so here you can add add_filter(‘show_admin_bar’, ‘__return_false); in functions.php file.
Deactivate sub-plugin when parent-plugin is deactivated
Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
This will find all terms in custom taxonomy underkategorier and then will show terms with post from chosen category. $taxonomies = get_taxonomies(array(‘name’=>’underkategorier’),’object’); foreach($taxonomies as $taxonomy) { $terms = get_terms( $taxonomy->name, ‘orderby=count&hide_empty=0’ ); foreach($terms as $term) { $wpq = array (‘taxonomy’=>’underkategorier’,’term’=>$term->slug, “cat”=>10); $myquery = new WP_Query ($wpq); $article_count = $myquery->post_count; echo $term->name.’ ‘.$article_count; //with empty ones … Read more