How can i call from custom fields to the category editor?

You are saving your extra fields to the *_options table so you need to pull them back out of that table. You can copy and cobble together bits of the existing code to do that. if ( is_category() ) { $current_cat = get_query_var(‘cat’); } $tag_extra_fields = get_option(MY_CATEGORY_FIELDS); // var_dump($tag_extra_fields); // debug if (isset($tag_extra_fields[$current_cat])) { var_dump($tag_extra_fields[$current_cat]); … Read more

WordPress plugin not eching popular posts

one possibility is: public function popularPosts($num) { global $post; $args = array( ‘orderby’ => ‘comment_count’, ‘order’ => ‘DESC’ ); $posts = get_posts( $args ); $count = 0; foreach ($posts as $post): if($post->comment_count != 0 ){ $count++; } endforeach; if ( $count > 0 ): foreach( $posts as $post ) : setup_postdata($post); if($post->comment_count != 0 ){ … Read more

How can I add the custom taxonomy categories to the posts and pages?

All what you need to do is just pass required post types as array in the second parameter for register_taxonomy function call: add_action( ‘init’, ‘wpse8170_init’ ); function wpse8170_init() { register_taxonomy( ‘my-taxonomy’, array( ‘post’ ), array( … ) ); // or call this function if your taxonomy is already registered register_taxonomy_for_object_type( ‘my-taxonomy’, ‘page’ ); }

Can’t remove menu items added by plugin

I’ll assume you’re calling it in your functions.php file? If that’s the case, likely the plugin is adding the menu item after you’re call is being called. Try placing it in the admin_init() hook, at the very end. if ( ! function_exists( ‘remove_wp_menu_items’ ) ) { function remove_wp_menu_items() { remove_submenu_page( ‘themes.php’, ‘theme-editor.php’ ); } } … Read more

Initialize class inside plugin

You don’t appear to have actually enqueued your script anywhere. You registered it, but don’t enqueue it, unless that code is elsewhere. When you load a file directly like you are– aka., browsing straight to ‘/wordpress/wp-content/plugins/konfigurator/html/class.konfigurator.php’— you can’t use any of WordPress’ functions because you have bypassed WordPress’ boot process. To use WordPress functions you … Read more