wordpress-plugin-dev

wordpress using - new_wp_query need help

I have a simple function: $connected_posts_ids = p2p_get_connected('to', get_the_ID(), 'actor'); This returns: Array ( [0] => 78 ) Long story short, it basically tells me the post_id of a post that is related to the post being viewed. It is an array because I can have multiple related posts to the given post. What I am trying to ...

Wordpress form handling

I need to add a basic form page in the website, that runs on WordPress framework. I have the following raw materials ready: Client side: html form layout,css and jquery validation code. Server side: form handler php function that processes the $_POST[] data. My problem is to integrate this code in the Wordpress framework. I have look...

Virtual pages for my plugin

Hi, I am currently in the process of making a WordPress Plugin which is going to parse some external data (products) from various web services and present them as normal pages in WordPress. I would like to avoid actually creating the pages programatically and instead just generate them on the fly to avoid any synchronization issues if a...

Determining Versions of jQuery with WordPress?

How do I determine the versions of jQuery that shipped with each version of WordPress since like version 2.7? Was there a log kept somewhere on this? Because as a plugin developer, I may need to rely on a function that might not work in older versions of WordPress. ...

Wordpress: how to call a plugin function with an ajax call?

I'm writing a Wordpress MU plugin, it includes a link with each post and I want to use ajax to call one of the plugin functions when the user clicks on this link, and then dynamically update the link-text with output from that function. I'm stuck with the ajax query. I've got this complicated, clearly hack-ish, way to do it, but it is ...

wp_update_user crashes my plugin for wordpress

I am trying to write a plugin which will update a user field. I can use the update user meta function OK, but when I try the wp_update_user it doesnt work. wp_update_user($user_ID, 'user_nicename', 'test'); That crashes the plugin. Do I need to include something for this function to work?? ...

wordpress filters documentation? Trying to understand add_filter()

I read over the documentation several times and have been having a hard time trying to figure out what is going on with the function. I'm more and more confused after looking at the documentation, looking over the source code as well. add_filter($tag, $hook, $priority, $args); it seems to me the new function extends the parent functio...

Filtering custom fields on wordpress admin page

I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom fields that will later be read from the template. The plugin adds an additional meta box to the "Edit Post" screen which is responsible for manipulating these values. My problem is that the custom fields generated by the plugin also show up in t...

How to add custom fields in WordPress "Add a New Post" page?

Hello awesome people, I want to add a custom field on Add A New Post page. Like - if I am to make a plugin which will post links to Twitter after a new post is made, I would like to give ability to user to select if he wants to tweet that particular post's link to Twitter. I want to display a check box somewhere in the page which says ...

using WP_Query with custom SQL in wordpress

Hi. I am writing a plugin for wordpress and I want to create my own search. I have tried to alter the wordpress search, but what I am doing is very specific with the SQL query. I am comparing lat and long coordinates and getting posts based on that. I can display posts by using the standard wpdb query, but then I don't get the other fe...

Wordpress Redirect on User Edit hook

Hi all, I looked through the Wordpress Hook DB and couldn't find any way to change the page that wordpress redirects to after editing a user... Does anyone know of a hook that will do this, or of another way I could accomplish the same thing? ...

Add widgets to custom WordPress sidebars on theme activation?

I'm working on a WordPress 3.0 multi-site installation. Each new blog will use the same theme with slight modifications (a custom Thesis install, if it matters). I'm trying to automate the set-up process for each new blog as much as possible. To that end, I'd like to automatically add widgets to my custom sidebars and widget-enabled foo...

Wordpress creating plugin for most viewed posts problem?

Hello,I just want to create plugin that will when visitor(user,visitor,...) visit some post,remember what post,and to increment counter of that post,I wrote this code,but sometimes,counter is incremented,even post isn't viewed,or post with other Id is added to a table.Can someone help me with this,please.I know that there are plugins for...

Wordpress: Use PHP Function based on Blog URL & Adding To MU-Plugins

I am developing a plugin for an MU site. The MU site has about a few hundred blogs, but there are three types of blogs and they are named as: blogname/sportstype1 blogname/sportstype2 blogname/sportstype3 blogname/celebritytype1 blogname/celebritytype2 etc. I need to make two functions, one for type1, and the other function for the res...

PHP absolute path with timThumb doesn't work

I'm writing a wordpress plugin, and using this script to resize images: Timthumb This script uses absolute paths, but I can't get it to work for me; I've triple-checked all my paths but still nothing. Here is my code: $plugin_dir_name = "my-plugin"; $pathTimThumb = WP_PLUGIN_URL . '/' . $plugin_dir_name . '/timthumb.php'; $pathToUplo...

Wordpress: apply_filters & add_action to the_content = EVIL?

I asked this question over in the actual tutorial, but not sure I'll get an answer anytime soon as it's almost 2 months old... so I'll take a gander here... Tutorial is here: Build a WordPress Plugin to Add Author Biographies to your Posts To sum up the tutorial and what the problem is, The tutorial adds an Author Bio on to the end of...

How do I get a list of items in the Wordpress media library on a plugin options page?

Hi! I'm writing a Wordpress plugin which injects a grid of images just above the footer on all frontend pages. The application is to display sponsor's logos. I'd like to harness the WP Media Library since the logos are already uploaded for use on the 'sponsorship' page and in posts. Essentially I'm stuck at accessing the media library...

Wordpress Update Version

Hi, Wordpress checks periodically to make sure that the version of Wordpress being used is the most up to date available... If it's not, the latest version number is displayed in the footer and in a notice below the header. Does anyone know the variable/constant/option I can use to get this number? Thanks. ...

Wordpress - How do you organize your plugins and themes code ?

Hello, I starting working with WordPress as a CMS, now that the V3 makes it way easier to manage taxonomies and custom post types. My work is mostly focused on developping plugins and themes. My biggest plugin does some admin stuff (add admin menu items and the related pages and features), but also does some importing and exporting, an...

How to create directory like structure in Wordpress

I would like to create directory like structure in Wordpress. The best example you can see here. So some products with additional information stored in custom fields (price, version and so on). Also I need links to be SEO friendly. Do you know about any tutorial or plugin that can handle this ? ...