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
0
votes
0answers
49 views
how to add interstitial page?
I am trying to get get the interstitial page. I have a plugin that fetches articles from an API. What I want is when user click on fetched article's link it should take them to a dynamic interstitial ...
0
votes
0answers
19 views
NextGen XML Issues
I am using NextGen Gallery to generate an XML file via PHP. I have a jQuery plugin that is loading a photo gallery from that XML feed. I've gotten the two to work together. It works great when it ...
0
votes
2answers
76 views
Yet another wp_insert_post infinite loop. What is wrong?
I am writing a plugin that enables subscribed users to submit posts of a custom type, and I am trying to implement this feature via shortcodes. Now the problem is that instead of inserting one post, ...
-1
votes
1answer
51 views
How to remove a class
Is it possible to remove classes from a plugin and add theme into to theme?
I need to modify Woocommerce WP_Checkout class but I want to move it to my theme folder so if woocommerce will be updated ...
0
votes
0answers
15 views
Odd behaviour caused by $wpdb->last_result and language switching
This has me scratching my head. The following code is called on two pages:
http://example.com/somepage/
http://example.com/fr/somepage/
class SomeClass {
function __construct(){
global ...
0
votes
0answers
25 views
Creating URL for custom php file
I'm having some trouble trying to figure out how to make a custom URL in the admin area for my plugin. I already know how to use the add_menu function, but I need to create a sub-page for the plugin ...
0
votes
0answers
38 views
What is the Correct Way to Use get_terms in a Plugin?
I'm currently writing a plugin for restaurant menu management. I have a custom taxonomy that I would like to retrieve the terms for from any page or post. Currently I have a sample dropdown list ...
0
votes
0answers
78 views
Wordpress plugin custom admin screens
I have managed to create my private messaging system, but now I want to make the user experience similar to both front-end users and to back end users.
What I have is a screen like gmail, which when ...
0
votes
1answer
53 views
Data Validation, dynamically generated fields (select for example)
Working to secure my plugin, I'm not sure what (if anything) to do about output such as dynamically generated select fields. For example, I have a country code select generated on the backend via PHP ...
2
votes
1answer
101 views
Creating a custom public user page
I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
0
votes
0answers
6 views
Registration_errors filter logic [duplicate]
I have a function that hooks into the registration_errors filter and adds a registered user to an external db. The problem is that even when the wordpress registration returns an error, the user is ...
1
vote
1answer
28 views
Issue plugin commands in admin settings page
What is the right way to issue commands in wp-admin? My plugin imports data from a set of RSS feeds via a cron job. Thats all working good. I've set up a custom settings page to change parameters, and ...
0
votes
1answer
34 views
Structuring function with registration_errors hook
I created a plugin that adds a function to the registration process where the user info also gets added to an external db. The problem is that, when the function runs successfully i.e. user is able ...
0
votes
1answer
39 views
Error: Call to a member function get_error_code() on a non-object
I am getting the following error when with the code that I wrote for my plugin:
Error: Fatal error: Call to a member function get_error_code() on a non-object in .../wp-login.php on line 335
I've ...
0
votes
2answers
44 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
1answer
42 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
38 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
34 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
143 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',
...
1
vote
1answer
65 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
32 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
70 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
0answers
10 views
Remove feed added with add_feed
I'm working on a plugin for something I need on my blog. I have really no experience with wordpress development or php.
I added a feed type by calling the add_feed($slug,$callback) function. Now the ...
0
votes
1answer
31 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
42 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
44 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
0answers
134 views
plugin admin panel select box field value is not saving
I have this form, max_number_of_events input text is saving but the events_to_display select box is not saving. Any ideas? I'm a beginner WP plugin dev. Thanks!
function ...
0
votes
1answer
62 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 ...
10
votes
2answers
439 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
33 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
53 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
83 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
26 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
46 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()
{
...
0
votes
0answers
42 views
shortcode with external file is showing twice [closed]
I have problem on short code activation in my custom plugin. The included file it's shows up twice.
class Configurator{
public function __construct()
{
add_action( ...
1
vote
1answer
138 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
81 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
74 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
28 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
64 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
68 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
49 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
51 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
104 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 ...
1
vote
2answers
114 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
58 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
44 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 ...
2
votes
1answer
136 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
62 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
110 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 ...



