Articles of plugins

Hide extra menus from WordPress Dashboard

How can hide extra menus from WordPress dashboard. That is some plugins gives plugin settings menu may under Settings or anywhere else, how we can hide all this type of extra menus while plugin active

What causes an Unexpected HTTP Error within install plugins?

Within “install plugins” I’m receiving an error stating “An Unexpected HTTP Error occurred during the API request.” When I do a plugin search it throws me back to my site’s 404 page. Any idea what would prevent my site from syncing properly with WordPress’s servers? I added Hameedullah’s code to functions.php and recevied this returned […]

Use plugin multiple times

I have a site for a booking agency for entertainers. Each entertainer has their own page. The sidebar currently contains the advanced twitter profile widget for the agency’s twitter account. Each of the entertainers’ pages needs the same widget in their sidebar with their own account id. Question is: Is it possible to use the […]

Can't get title of latest post

I’ve just started learning PHP/Wordpress yesterday – here is one of my first plugins. Unfortunately, it’s not working like it’s supposed to – the title doesn’t display. What’s wrong with my code? function show_title_on_dashboard() { $newest_post_id = $post[0]->ID; $title = $newest_post_id->post_title; echo “Latest Post: $title”; } add_action(“admin_notices”, “show_title_on_dashboard”);

Error handling a plugin with exceptions

I’m creating a new plugin and I want to handle errors cleanly. I find the WP_Error class unwieldy so have decided to use exceptions. I am not bothered about lack of PHP 4 support. $error = true; if ($error) { // Throw an error throw new CustomException(‘A custom exception’); } What I really want to […]

Remove Widgets in Dashboard

Another noob question…when authors log on and access their Dashboard, they see all sorts of widgets such as an Internet Explorer warning, news on what’s going on with WordPress. Is there anyway to remove all of these for all users (present and future), so that they only see the ‘Quick Press’ & ‘Right Now’ widgets? […]

How to replace or display the special characters from JSON API plugin

I started using the JSON API plugin. It works good ! But the problem i am facing is, If i enter any text containing special characters through CMS The output is not same as the given text. Why this is happening? Example: It’s a good app (Input) The output looks like It ' s a […]

Problem with wp_enqueue_scripts in plugin

I’ve created the following plugin which requires a js library, however attempts to load the plugin with the line add_action( ‘wp_enqueue_scripts’, ‘calc_script’ ); in place fail with the error unexpected T_STRING any help appreciated. <?php /** * Plugin Name: NME Savings Calculator * Description: A widget that displays the potential savings from installing solar panels. […]

How can I list recent posts excerpts?

I am using this directly from the codex to list 3 recent articles titles. <ul> <?php $args = array( ‘numberposts’ => ‘3’); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo ‘<li><a href=”‘ . get_permalink($recent[“ID”]) . ‘” title=”Look ‘.esc_attr($recent[“post_title”]).'” >’ . $recent[“post_title”].'</a> </li> ‘; } ?> </ul> This works fine however, when I […]

Change post permalink to external URL from custom field

I want to let my users submit links to my website something like reddit and digg. I added a meta_key ‘syndication_permalink’ which contains link to this post. How could I change the post permalink to link this custom link not to my page?