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
0answers
39 views

Saving plugin data returns “You do not have sufficient permissions to access this page.”

I'm developing a quote plugin which will save a quote to the WPDB using a form to input the quote. I've created half this code and got the other piece from another programmer on here. I'm looking to ...
0
votes
2answers
63 views

Change page according to fetched GET Parameters

I want to write plugin which has the ability to change the start page according to a get parameter: The following code is the full plugin. function GET_Different_Page_on_front_parameter() { if ...
1
vote
2answers
76 views

Way to hook into a sidebar call to replace it with a custom sidebar

I want to replace the sidebar-2 in the twentyforteen theme with a custom sidebar based on a conditional statement for CPT. So if the page is showing a certain custom post type then show my custom ...
0
votes
0answers
47 views

Dynamic banner for use on external sites

Pro question: we would like to display our most current wordpress articles on external sites (something like advertisments or banners). I think this could be easily done with iFrames, but I doubt ...
1
vote
0answers
49 views

How to remove default style of header in wordpress metabox

I have the problem which when I create a header in my wordpress plugin metabox, it always apply the default style on my header: even when I apply, my own style, <h3 style="background-color: ...
0
votes
1answer
244 views

How to completely disable a taxonomy archive on the frontend?

I have registered three custom taxonomies. All three of these custom taxonomies are attached to my custom post type. There is only one taxonomy out of the three registered, that I would like not ...
0
votes
1answer
120 views

How to get post bulk edit action trigger and get edited post ids?

I want to send email if a postmeta of a post is changed to the expected value.So previously i was doing loop to check the post meta in each post. In here am running the loop in admin_init hook. But ...
1
vote
1answer
205 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
1
vote
1answer
256 views

Hello dolly type plugin that allows people to add their own

I am making a plugin that shows a random joke on a custom 404 page via shortcode and it is basically near enough the same as the default hello dolly plugin, where the jokes are hardcoded into the ...
0
votes
1answer
47 views

Is there an admin hook that will let me read GET variable before it's too late to set the header Location

I need to redirect the page based on the query vars in my plugin admin menu. I don't know where I can hook in to read the query vars or the GET vars order to decide if the page needs to be redirected. ...
1
vote
0answers
22 views

Is there a directory my plugin can write files to that cannot be viewed via the browser/url?

I want to restrict access to some files uploaded via the admin interface but I cannot rely on the ability to use .htaccess (could be turned off, or they might be using a non-apache web server). I ...
1
vote
0answers
84 views

Custom code for WordPress dynamic menu

Without using plugins, how can I create a custom WordPress navigation menu to produce the following code? <div class="bottom_section_full"> <div class="bottom_section_left ...
0
votes
1answer
64 views

If $var is empty, return 404.

For security reasons, to detect if somebody is manipulating GET parameters of the plugin I'm writing, I need to return a 404 if the security query I perform returns nothing. How can I force that? I ...
0
votes
0answers
9 views

Plugin's custom page

I'm making a plug-in changing default login page to custom login page. Assume that such page is laid to file custom-login.php in folder of plug-in. And two problems appear now: - how to access ...
1
vote
0answers
118 views

How to instantiate customize_save_after callback function?

I have to do some custom operations after settings are saved in the customizer. It looks like the callback function isn't invoked. What am I doing wrong? Something to do with the Ajax status of the ...
2
votes
1answer
580 views

“Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin

I am developing a plugin using Tom McFarlin's Boilerplate repository as a template, which utilizes OOP practices. I've been trying to figure out exactly why I'm unable to correctly submit my settings. ...
0
votes
2answers
71 views

I18n not working in plugin

I'm sure I'm making a dumb mistake, but I don't for the life of me know what it might be. I recently converted one of my larger plugins to utilize I18n (my first time doing so for any of my plugins). ...
0
votes
1answer
57 views

What's an efficient way to change the post status of many posts at once?

I'm looking for an efficient way to change the post status on many posts at once. I have a custom post type that I'm using as a means to store content that must be approved by a moderator before being ...
0
votes
0answers
56 views

Responsive Development in WordPress Backend

I've gotten so used to using Twitter Bootstrap. However, I can't seem to use it on the backend. I'm assuming it's conflicting with something in the core. So is there a way to get Twitter Bootstrap to ...
0
votes
0answers
139 views

Plugin options with googlemap iframe

I have put google map in text option of plugin.The text input value is <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ...
1
vote
1answer
52 views

Modify hard-coded conditionals for roles to custom roles

Hopefully this makes sense. I'm still learning. There is a function in a plugin I'm developing that I want to modify to recognize custom roles. My function works when it is hard-coded to accept ...
1
vote
0answers
271 views

Plugin generated virtual pages

I am currently devloping my first WP plugin. This plugin should generate dynamic pages on the fly if a fixed non-existing URL is requested. This means I want my installation to accept addresses like ...
0
votes
0answers
114 views

How can I add an Export option to a WP_List_Table

I have an admin page that extends the WP_List_Table class to generate a table of results from a custom database table. I am trying to add a button that will enable the admin user to export the results ...
0
votes
1answer
107 views

Wordpress plugin development OOP style

I am building my first oop based plugin.This main problem is that it is not showing settings field(font error input).So far my approach.. $plugin_settings = new WordPress_Plugin_Template_Settings( ...
0
votes
1answer
749 views

Wordpress plugin: admin-ajax.php not passing data to custom function

n this basic plugin skeleton, I am trying to get the data sent by ajax to wordpress admin-ajax.php to be processed by a custom function. It looks like the data send from the form does not reach my ...
1
vote
1answer
272 views

How to create custom tables in WordPress using my own plugin?

I am new in WordPress plugin development. This is my core PHP and HTML code create-table.html <form method="post" action="function.php"> <input type="text" name="table_name"> ...
1
vote
2answers
2k views

Add an image gallery to a custom post type?

I am pulling data from an external web service into a custom post type. This data includes images. How can I create an image gallery, add some existing attachments to it, and associate it with a post? ...
1
vote
2answers
46 views

How should I store a log for my plugin

I have a plugin that sends data to a server as part of a transition_post_status action. The server sends a response each time. I want to keep a log of these responses (permanently) that I can display ...
0
votes
2answers
51 views

Are plugins instantiated on every request to Wordpress?

I want to know how wordpress plugins are instantiated, if Wordpress creates a instance of plugins every time that a request is made to wordpress? Example. I open /wp-admin: The plugin is instantiated ...
0
votes
1answer
97 views

Show error message after exception handled

I have a plugin that updates a user profile, and I want to handle a date exception and show a error message when it fails, but I can't make it work. Here is part of the class: private function ...
0
votes
1answer
29 views

How to replace settings in WordPress plugin from a theme

I created an array with some default settings in a plugin, and want to allow it to be replaced from functions.php in a theme without using stored data (eg. add_option). I want this to be just a hook ...
1
vote
1answer
27 views

How to exclude certain files from the plugin editor?

Is there a way to tell WordPress not to list certain files of my plugin in the Plugins -> Editor screen?
0
votes
2answers
95 views

How to use get_sidebar in plugin folder?

I've created the plugin that adds custom post type and custom taxonomis for this post type. Templates for the post type and the taxonomies are located in plugin folder. Now I need to add sidebar for ...
-2
votes
1answer
32 views

Getting Plugin directory and url

In one of my theme the path and directory is set by if( !defined('ADMIN_PATH') ) define( 'ADMIN_PATH', get_template_directory() . '/admin/' ); if( !defined('ADMIN_DIR') ) define( 'ADMIN_DIR', ...
0
votes
0answers
33 views

Web System Architecture

We are building a web system in wordpress. I have read some articles on how to architect a wordpress web system. I really liked the one which suggested using loose MVC Pattern. I have read a couple ...
1
vote
3answers
125 views

What are the benefit in adding hook in the init() hook?

I see a lot of plugins using this approach to add a new hook, e.g. add_action('init', function() { add_action('SOME_LATER_HOOK', xxx); add_filter('SOME_LATER_FILTER', yyy); }); Why they don't ...
1
vote
2answers
58 views

add javascript files only when plugin is called?

I'm writing a WP plugin that might be called on any page using a simple function call:getDeck(Deck_id) - and i'd like to add my javascript files on pages where this function is called ONLY, as ...
0
votes
0answers
131 views

using hyperlink in wordpress plugin

Im developing wordpress plugin . I added a plugin to the admin menu . After clicking on the plugin is displayed user login. (I used parameter-magic func from the wrapper function ...
0
votes
0answers
1k views

WordPress Plugin: Global Update

Hi I want to be able to make a plugin that will check for updates of other plugins that i have made from a single place. In my main plugin file i have include_once( 'class-login-slider-updater.php' ...
1
vote
1answer
96 views

wp_dropdown_roles() to replace option value = code

I'm trying to replace a hardcoded dropdown list of roles in a plugin. Currently this is the code: echo '<select name="xf_user_role_' . $id . '" id="xf_user_role_' . $id . '">'; ?> ...
0
votes
1answer
84 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
1answer
93 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
1
vote
0answers
54 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
1
vote
1answer
82 views

Common functionality between my own plugins

I read that when creating new post types, creating a settings page, and creating a new taxonomy, you should create a plugin. So I have done that. But I have functionality, which could be generalized, ...
0
votes
1answer
247 views

How to add custom content under plugin row in WordPress admin plugin list?

I'm looking to add a custom message under my plugin in the "Plugins" page, much like the following screenshot: What action or filter should I use? Thank you!
1
vote
1answer
453 views

How to safely sanitize a textarea which takes full HTML input

I'm developing a plugin which enables the user to send HTML emails from within the WordPress admin. How should I sanitize the textarea input? It has to be able to contain the whole range of HTML tags ...
0
votes
2answers
70 views

WP Plugin Running before jQuery

I'm having problems with jQuery and a plugin, the console error says jQuery is not defined. What I don't understand is it only fails when I load it to the production server, on my local dev ...
0
votes
0answers
14 views

Problem Display Custom Post On Page

i am new in wordpress and first time i make plugin with help of tutorial i make custom post i need when i add data in custom post display on page but i still didn't find the mistake please suggest, i ...
0
votes
1answer
68 views

Using user_status in conditional with get_users to return existing users

I'm working on a plugin needing to return avatars a specific way. If the user exists in the wp_users table the code is run else a different set of code is run if the user is not in the wp_users table. ...
0
votes
0answers
49 views

What method should I use to store my plugin data (multi level menus with options on each item)

So the background on my plugin - it generates taxonomy/term filters to give you a filtering system similar to what you'd see on NewEgg where you filter your results by category/manufacturer/other ...