Trying to insert a row from a Plugin

insert is not a static method. So you can’t call it like this: wpdb::insert(/*…*/). You’ll need to do something like: global $wpdb; $wpdb->insert(/*…*/); Or create your own instance: $db = new wpdb(‘dbuser’, ‘dbpassword’, ‘dbname’, ‘dbhost’); // change these! $db->insert(/*…*/);

Strict Standards: Non-static method in sidebar generator

There’s not a huge amount you can do about this. Many developers turn off strict errors, as they are pervasive (there are even some in core). Of course it could be fixed – but then what? It’s a plugin, so the next time you update that plugin, your changes will be overwritten.

Get ID of a NextGen album that is linked to a subpage [closed]

I got some help from Benjamin at the WordPress support forums The solution I ended up with is the following: global $nggdb; $galleries = array(); $children = get_children(“post_parent=$post->ID”); foreach($children as $kid) { print_r($kid); $page_id = $kid->ID; $album_mapper = C_Album_Mapper::get_instance(); $albums = $album_mapper->find_all(array(‘pageid = %s’, $page_id), TRUE); foreach ($albums as $albumMap) { $albumID = $albumMap->ID(); After … Read more

Open all PDF or docx link as iframe

You can use the plugin vanilla-pdf-embed. If the PDF is in your WordPress media library, it will be embedded with the default settings in all the posts where it is written. If isn’t in the media library then use the [pdf]…[/pdf] shorttag: [pdf]http://domain.com/2012-04/item-1335086631.pdf[/pdf]

Plugins not showing on dashboard?

I had the same problem the site I was developing was utilizing this plugin to show gallery on the homepage. The first few days the site was working well but when I launched a persistent white screen of death error developed. I used the FTP access to rename the plugin file to something like(old_plugins) in … Read more

Build a Boat Form Plugin [closed]

Your best option is to buy the Gravity Forms plugin in order to accomplish this. http://www.gravityforms.com/ Yes, there are other form plugin options such as Contact Form 7 but I can assure you (and everyone here) that the Gravity Forms plugin is hands down the option for this task.

How to add image for custom taxonomy

You can use get_object_taxonomies() as your solution. Returns all the taxonomies for a post type or post object: <?php get_object_taxonomies( $object, $output ); ?> Have you tried anything? something like this? // taxonomy term archives $post_type = get_post_type(); // find out if CPT $taxonomies = get_object_taxonomies($post_type); // Find taxonomies if($taxonomies){ foreach($taxonomies as $taxonomy){ // only … Read more