Tagged Questions

WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

learn more… | top users | synonyms (1)

0
votes
2answers
192 views

wordpress remove views from action links in a custom post

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post. I have tried this snippet add_filter( 'post_row_actions',array(&$this, ...
0
votes
2answers
224 views

Listing wordpress users with a search function

I'm having trouble finishing off this code that I adapted from Cosmoslabs excellent tutorial. Everything is working (listing and pagination etc) except the search function whic is returning nothing ...
0
votes
1answer
54 views

Is there anything special required to make a plugin work in a multisite environment?

I've been developing plugins for about a year now, but not having any experience with multisite environments, whenever a question comes up that is specific to that environment I'm generally stumped. ...
0
votes
2answers
64 views

Disable plugin visibility at the plugin directory

Hello I have recently pushed my plugin's files to WordPress SVN trunk. Unfortunately, it's not a ready to use release. I don't want anybody accidentally download this half-baked 'release'. Can I ...
1
vote
1answer
2k views

wordpress get meta value by meta key

How to get the meta value by meta key I want to get the value by the meta key. This is what I have tried so far: $args = array( 'post_type' => 'post', 'post_status' => 'publish', ...
3
votes
2answers
459 views

Plugin screenshots not showing in the repository

I'm having major trouble getting the screenshots to show in my plugin. I have validated the readme file and placed the screenshots in both the /trunk and /tags/1.0 directories (1.0 is stable). I have ...
1
vote
1answer
81 views

Creating a plugin to sanitize comment and the url field before display only

I want to create a plugin to sanitize comment and mainly the url field before display only (not before adding to database), to filter the url fields and only allow displaying this field only if it ...
0
votes
1answer
269 views

Restrict certain actions to plugin-specific admin menu pages only

I'm working on a plugin and want to restrict some things to my plugin-specific admin menu pages only. Therefore, I write the slugs being returned when adding (sub)menu pages into an array so I can ...
0
votes
1answer
60 views

How to relate the Category to user?

I am developing one new plugin, In that i had a section to create new category, and having the field Created By(listing all the users in this field). I am storing the category name in WP_terms and ...
1
vote
1answer
83 views

how to get all the child category name in a specified category name?

Supposed the specified category name is "product", which has three layered sub-categories. The structure is like the following: product one product two product three product four I want to ...
0
votes
1answer
104 views

Doing action based on input from options menu

This is my first time writing plugin. I have managed to get options menu with the html form: <?php add_action('admin_menu', 'menu'); function menu(){ ...
0
votes
1answer
489 views

Get a custom table to an array

How can I take my table I created like this: global $wpdb; //Get all the wordpress database stuff $table_prefix = $wpdb->base_prefix; //Get the global prefix for all sites (on a multisite ...
16
votes
2answers
2k views

Enhance Media Manager for Gallery

I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view. I want to add a new select field on the right side and send the selected values to the gallery shortcode. I ...
0
votes
2answers
98 views

wp_get_theme Warning: Illegal offset type

I'm using Post templates plugin. But its very outdated. I'm getting Warning: Illegal offset type at this line $templates = $themes[$theme]['Template Files']; Here is my full function code. ...
0
votes
1answer
108 views

How to validate inputs with filter in register_setting callback

I now have this function that works well : function wpPartValidate_settings( $input ) { if ( check_admin_referer( 'wpPart_nonce_field', 'wpPart_nonce_verify_adm' ) ) { // Create our array for ...
0
votes
2answers
783 views

Most viewed post of custom post type

Im using following code for getting most populer post with thumbnail.I have a custom post type taxonomy (Talks). Custom post types(video) have 6 category. But my code not working. It just getting 1 ...
0
votes
1answer
63 views

Submit form to db

I am unable to get this insert to db function to work using ajax and a form. When I execute this, I receive a blank alert box on success. HTML <div id="rsvpContent"> <form ...
0
votes
1answer
197 views

Initialize class inside plugin

How can I initialize inside wordpress a class. I would like to send requests via ajax to plugins class. First I have the entry point. class EntryClass{ public function __construct() { ...
2
votes
3answers
2k views

Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader

I'm working on a plugin in which I do the following for autoloading classes: function TFSLAutoload($class) { $classfile = dirname(__FILE__).'/includes/'.strtolower($class).'.php'; include ...
0
votes
2answers
422 views

What are the Best Practises When Using AJAX in Plugin Development?

I am in the middle of creating a plugin and everything works fine with the AJAX calls but one question I can't seem to find the answer to is about best practise. I route the AJAX calls through ...
0
votes
2answers
815 views

json_decode does not work on Wordpress

I'm trying to convert a json string back into an array in wordpress. Here is the json string that I'm getting back from the database: [ { "item_title": "Kindle Fire HD 7\", Dolby Audio, ...
1
vote
1answer
37 views

How to store an extra (surrogate) ID when creating a post with wp_insert_post?

I am generating posts based on rows from a table on an existing database. If a row in the database gets updated I will have to update the respective post. The proble is that I have to find the post ...
2
votes
2answers
2k views

How to pass a parameter to this add_filter example

I have a class with this function to provide a user language based on $user_id function provide_user_language($user_id) { return apply_filters('get_user_language',$user_id); } So in my script, I ...
1
vote
1answer
191 views

plugins_url() works everywhere but wp_reqister_script()

So I should probably mention up front that I'm developing a plugin so my url is 'mysite.com/plugin' (Just in case this is related to my issue. So, In my main plugin file (myplugin.php) I have added ...
0
votes
1answer
270 views

wordpress is adding a second backslash when I use addslashes

I don't know why but it seems like wordpress is adding a second backslash when I'm using the following functions: addslashes($str_with_single_quotes) ...
0
votes
1answer
295 views

How to get the post content after Wordpress post processing?

I have a plugin that will send tutorial emails to our users. These tutorials are created in wordpress and stored in wp_posts table in the database. Of course I could simply run a query to get the ...
2
votes
1answer
365 views

How to install Wordpress Popular Posts plugin twice?

I've installed Wordpress Popular Posts plugin but found that it displays popular posts only from category. I want to display popular post for custom taxonomy. I found some hack in that plugin. Plugin ...
2
votes
2answers
814 views

How to modify post content before writing to database?

Hi~ I'm back again and I'm trying to add another function to the script I was working on a plugin that notify my friends of new post that mentions(@) them. Now I want to change the plain text of my ...
0
votes
1answer
234 views

Can't find where to modify <html> attrbitutes

I am trying to create a simple function that adds or edits data in the <html>. Basically, before the server response is sent, I want to find where this piece of html is written at the top level ...
3
votes
1answer
124 views

Update a Plugin while maintaining back compatibility: general

How can I make updates a public plugin of mine without breaking the plugin for all existing users. Firstly, I'd like to change the main plugin's class/namespace, because I'd like it to be similar ...
5
votes
1answer
1k views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
0
votes
1answer
202 views

Thumbnails for media Library images

I have somee Item in the media library, where I want to retrieve the thunbnail from. I use the normal post thumbnail functions (tried some of them), with normal posts or cpts's the work fine. As ...
4
votes
3answers
192 views

Custom Post Type Link from Plugin

I'm currently working on a plugin that creates a custom post type. The issue I'm strugging with at the moment is that the custom post type is created fine, but when I go to add a new post I receive ...
0
votes
3answers
152 views

Trouble using wordpress functions in a pop-up modal form

I'm working on a plugin and I've added a button to the tinymce editor that pops up a modal form, with options for the shortcode, and then inserts the shortcode with the selected options in to the ...
4
votes
1answer
339 views

Writing a plugin that notify my friends of new post that mentions(@) them

For example, I write a new post with content "Today I'm happy, because I finally met the girl that @David told me about bla blah..." Once the post is published, there should be an email notification ...
2
votes
2answers
145 views

Placement of Code in Plugin for hooking `save_post`

I ran into a strange Problem today developing a new Plugin. I set it up as usual, creating the f711-roomprice folder in the Plugindirectory, and creating the f711-roomprice.php as well as an inc ...
2
votes
1answer
387 views

Save HTML formatted data to post meta using add_post_meta()

Array ( [post] => Array ( [jw_objective] => Exposure to e<b>nd to end development</b> of various applications; right from requirement analysis to system ...
1
vote
0answers
232 views

Getting wp.me shortlink for wordpress custom post type

There is a button called "get shortlink" for wordpress builtin post type & pages. If we click on it we can get wp.me shortend url for that particular post This can also be got using the function ...
1
vote
1answer
2k views

Edit Yoast SEO breadcrumbs output

I want to customise the output of Yoast SEO breadcrumbs, I have this so far which works great: add_filter( 'wpseo_breadcrumb_single_link', 'ss_breadcrumb_single_link', 10, 2 ); function ...
1
vote
1answer
152 views

I would like to use create a function in my custom plugin to tell WP to use a different header

I am well aware of the use of child themes for this. I know about get_header($name). I already understand the use of conditional tags. I want my plugin to remove the function: function get_header( ...
5
votes
1answer
571 views

How do you create an archive for a custom post type from a plugin?

So I'm creating a plugin to create buildings that list condos for sale. The simplest way to do this was to just create a custom post type for the buildings and then the listings but I'm now stuck on ...
0
votes
1answer
341 views

Can Not Redirect from Plugin-Registered Admin Page

I am doing the following in my plugin: Register a custom admin page and in the callback function (the last parameter of add_submenu_page) Redirect to another page However, when I open the custom ...
0
votes
1answer
74 views

Get Core Functionality from Within a (Secondary) Plugin File

I have a plugin with the following structure: myplugin.php includes/authentication.php I can access core WordPress functionality inside myplugin.php fine, but when I try to access stuff such as ...
1
vote
1answer
65 views

Adding Second Plugin Author

Background: I have a few plugins in the WordPress directory and have recently made the decision to team up with another individual to grow one plugin faster. I'm planning on adding him as a plugin ...
0
votes
1answer
2k views

Woocommerce custom emails without header and footer

I'm working on Wordpress / WooCommerce extension plugin to enable Password Reset on the main site (not wp-admin). I want to use standard WooCommerce mailer and email template to send Password Reset ...
0
votes
1answer
93 views

Can't remove menu items added by plugin

I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just ...
0
votes
2answers
65 views

Remove .htaccess portion upon plugin deactivation?

I have a plugin that inserts some rewrite rule in the .htaccess file. However, upon deactivating it, doesn't remove said rule. The rule is nested in # BEGIN My plugin and # END My plugin. I want to ...
0
votes
1answer
206 views

WordPress Page Reload Takes forever during theme development

OK, I'm hacking my way through my first theme (while reading Prof. WP Design & Development 2nd Ed.) and .... EVERY TIME I change -for example- a p tag or a div tag or a css rule, when I then go ...
0
votes
1answer
194 views

register_activation_hook() not activate plugin

I am writing a plugin that on the activation must create a new table in database. To do this i am using: register_activation_hook( __FILE__, 'createTable' ); When i run the activation, my plugin ...
1
vote
0answers
278 views

Post added via wp_insert_post with category doesn't show in category listing

I've created a plugin that auto creates a post and attaches a category to it, which is then hidden from the main blog and only shows in the category listing... I can successfully add a new post via ...