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)

-3
votes
0answers
15 views

How to make static custom wordpress pages responsive and dynamic

I am new in Wordpress development. i have deceloped a wordpress theme which has static pages now i have two problems:- Whenever I resize the browser windows the layout of pages become horrible. So ...
9
votes
4answers
2k views

Best way to abort plugin in case of insufficient PHP version?

You write a plugin which requires PHP 5.1. Someone tries to install it on a server with PHP 4. How do you deal with that in a safe and user-friendly manner?
1
vote
1answer
17 views

call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members

I am trying to create a theme option page in my plugin. I have pasted below the entire code. But it is giving an error : call_user_func_array() expects parameter 1 to be a valid callback, array must ...
0
votes
1answer
21 views

Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files

Just see the following code snippet. I have came across this in one of the plugins that I am reading now. if ( ! defined( 'ABSPATH' ) ) { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 ...
2
votes
1answer
169 views

Create a plugin to change the action to which a function is hooked

I have a plugin that hooks a function on to the woocommerce_before_my_account action. I would like instead for the plugin to hook that function to the woocommerce_after_my_account action. If I ...
0
votes
1answer
18 views

How to automate wordpress plugin activate and deactivate by php logic?

Is it possible to build logic to control the activation and deactivation of specific wordpress plugins , for example Activation/Deactivation triggered by time period? thanks for knowledge sharing.
0
votes
2answers
1k views

admin_notices not displaying in plugin

I know I'm probably doing something dumb here but I just can't get this to run. I'm trying to set up a little API for my plugin and to create a class to display admin notices a little easier. Here's ...
0
votes
1answer
14 views

Callback function quicktags that uses variable in start tag

I am trying to make a callback function that returns on click of a quick tag wordpress button dinamical generated variables inside the tags. Something like QTags.addButton( 'eg_wrap', 'WRAP ARROWND',...
5
votes
1answer
79 views

Unit tests - Dealing with dependencies

This might be seen as a corollary of Testing hooks callback. The issue: I want to test a class which creates a new instance of a My_Notice class defined outside the plugin (let's call it the "Main ...
1
vote
3answers
2k views

How can I track active users of my plugin? and why doesn't WordPress.Org offer this?

It seems every major app platform from Android to iOS has great stats for developers. However, if you publish a plugin via WordPress.org you are not allowed to include any 3rd Party tracking code (for ...
2
votes
2answers
456 views

prevent post to have multiple categories in my plugin

I'm writing a plugin, I want to prevent posts have multiple categories (i.e same product having category "Samsung" & "Apple"). Any idea on how to use some actions/filters to achieve this using my ...
3
votes
1answer
248 views

Authoritative answer on which boots first - Plugins or Themes?

I can't seem to find anywhere in the WordPress documentation an authoritative answer on the question on whether a WordPress plugin boots first or whether a WordPress theme boots first. I need to know ...
0
votes
0answers
19 views

custom field shows also images of other posts in lightbox

function wp_list_mine_posts( $wp_query_obj ) { // Front end, do nothing if( !is_admin() ) return; global $current_user, $pagenow; wp_get_current_user(); // http://php.net/...
-4
votes
0answers
16 views

ultimate member form not showing [on hold]

I am using ultimate member, and I used the shortcode on the register page but form is not displaying but when I do view page source I can see the form code there.. why this is happening ? here are ...
0
votes
0answers
15 views

Injecting bbcode back from popup to post Visual editor

I'm trying to make a Wordpress plugin that can generate media bbcode for wordpress. my popup2wp.php , this is adding a button to edit post media toolbar, that will open a popup window. <?php /* ...
0
votes
0answers
16 views

Why WP Query Multiple Shortcode not working on same page?

I created a Shortcode slider which gets ids of different pages and show display slider. Shordcode works fine but issue is that whenever i am copy past shortcode multiple times on same page/ template ...
8
votes
1answer
71 views

When to use Exceptions vs Error Objects vs just plain false/null

I'm in the process of writing a plugin and I'm trying to gauge when to use different approaches of handling errors. There are three methods I'm considering: Throwing an Exception (custom class) ...
0
votes
1answer
1k views

Create an user on external database

I have wordpress site and a project management system from codecanyon. Here is the link I have disabled registration for users in project managment system, only login is enabled. I need to make users ...
0
votes
1answer
27 views

Schedule some work in custom plugin

I want make a scheduler to update a table in the database every 24 hours. After searching, I found this: if (!wp_next_scheduled('jw_cron_hook')) { wp_schedule_event(time(), 'two-minutes', '...
1
vote
1answer
22 views

Is it possible to modify the media library admin screen?

I've been searching for a few hours now but I can't seem to find a solution to this. I'm developing a plugin and I'd like to be able to add custom text underneath the admin media library heading. I ...
0
votes
1answer
909 views

WordPress REST API Plugin Development - Add Custom Endpoint

I have this question on Stack Overflow but thought here might be a better place for it... I'm almost certainly doing something stupid - or rather not doing something obvious that I should have done. ...
2
votes
0answers
18 views

Custom values are not translated

I'm trying to translate my plugin. Inside plugin's root folder I have 'inc' folder, where located registration.php file. This file has a code, which adds custom fields to comment form. (I use right ...
0
votes
1answer
24 views

Fullwidth slider using background image Flexslider WordPress

I'm hoping someone can help, I have created a slider plugin using Flexslider that works using custom post types etc. Anyway, it all works great except, I want to set the image as the background of ...
0
votes
2answers
43 views

insert multiple entries in database using a loop issue

Update i have fix the first problem by changing the strectures in sending datas to database, now my problem is that when i select multiple choices and click submit only one of the choices is updated ...
14
votes
3answers
15k views

Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1

How is it possible to add a custom button to the visual editor TinyMCE, Version 4? Currently I found this q&a with a little bit hints to the topic, but not a solution or a how to. But I can't ...
8
votes
1answer
134 views

Add self-closing shortcode button to TinyMCE in WP 4.6

I'm familiar with creating self-closing shortcodes like: // shortcode function wpse_shortcode_example( $wpse_atts ) { // Attributes $wpse_atts = shortcode_atts( array( '...
0
votes
1answer
14 views

How to Create Custom HTML Tag on Editor in `Text(HTML)` mode

Can you please let me know how I can add a custom Tag button into WP Editor in Text(HTML) mode like what I would like to insert into the Post is something like <hr class="dark-line-2" /> ...
0
votes
1answer
477 views

Widget plugin and input file

I am writing a widget plugin; and I want to insert an input tag:<input type="file"> to browse for a pattern in my widget plugin admin panel; but I have problem to save its value(address of the ...
-3
votes
0answers
12 views

Need Help in CCfrom plugin for a custom wordpress page

i am new to wordpress. I have created a wordpress theme (for a website). Where i have a contact us page. In this page i want to add a contact form which should be look like this. and contact form ...
0
votes
1answer
24 views

Plugin translations problem

I developed a plugin for my client in english by default. I created estonian and russian translation files. But my client installed wordpress with estonian language by default and now, when my plugin ...
0
votes
1answer
30 views

Autogenerate a Table of Contents

I am trying to generate a Table of Contents at the top of each of my posts and would like to minimize the requirements on the author. Ideally, the author would enter only various levels of the header ...
-1
votes
0answers
18 views

A simple 2d furniture planner plugin [closed]

A client has asked us to provide a simple online furniture planning tool. The customer should be able to pick one of 10 furniture modules and arrange them in a line or an l-shape. The furniture ...
0
votes
2answers
28 views

Font Awesome stopped showing icons, shows &# text instead [closed]

after migrating my WP site to a different domain and making adjustments, Font Awesome stopped showing icons and shows some weird text instead, for example & # 61505; (I can't copy it as a text, ...
0
votes
1answer
32 views

How do I check if my $wpdb->insert() was successful?

I'm trying to write a little script within my footer.php (which I'll later transform into a plugin) that send two form fields to a custom table (wp_newsletter). I'm already sending the form and ...
0
votes
0answers
19 views

Restrict a Shortcode use in text widget only

I want to ensure that a given shortcode can only be embeded in a text widget; and not in a post or page. I thought I could use the strip_shorcodes() function to Strip shortcodes except in a text ...
0
votes
1answer
446 views

Input with spaces in Shortcode attributes overwritten by defaults

question seems to be similar to the one asked here but the answer went down a different path. Pretty much if a user enters a shortcode attribute with a space it will get overwritten by the default ...
1
vote
2answers
15k views

How to add multiple images to custom post type?

I would like to create a simple plugin to add multiple images to a custom post type. I have created a plugin to add a single image to a custom post type, but I am unable to figure out how to add ...
0
votes
0answers
17 views

creating posts from excel random number of posts are created

I'm creating a plugin to import posts from a CSV file. The plugin is creating posts, but a random number of posts are created with an infinite loop. I have checked the while loop and for loop, they ...
0
votes
1answer
27 views

Plugin Development Output

I'm trying to put together a plugin of the onScrollBlur effect seen on Medium. At the moment I am trying to get output of the HTML via a shortcode, but I'm outputting nothing - including the JS and ...
0
votes
1answer
27 views

How to add a secondary button to a settings page with a custom action?

I have written a plugin that interfaces with a third-party mailing API. I have created a settings page for my plugin that includes two buttons: a submit button created with submit_button() which ...
1
vote
1answer
74 views

Filter, or any way to dynamically change theme screenshot image?

I'm building a web application on top of WordPress. Part of this will be to automatically reconfigure theme assets based on the industry my user is aligned to. For example, the theme will auto-...
-1
votes
0answers
19 views

WP Super cache plugin set other plugin directory path

I don't know if there is anybody familiar the WP Super cache plugin, but according to the documentation it it possible to set the plugin directory to another path (the plugin is extendable by so ...
0
votes
0answers
12 views

preg_match_all() deletes regex delimiter each time wp_remote_get() is called

When I use wp_remote_get($url) to get data from query.yahooapis I receive a string, I pass that string through preg_match() so I can filter the information I want (In this case the price, the data ...
2
votes
2answers
52 views

Page Reloads Before AJAX Request Finishes

I am working on a WP plugin, and I need to be able to call a URL (specifically an AJAX function) using a button click, but the page refreshes after clicking it, which I think is preventing the AJAX ...
0
votes
2answers
1k views

AJAX request not routing through proxy

I've built a plugin that uses AJAX to post a URL to the URL2PNG API and bring back a screenshot into WordPress via wp_remote_get. It works beautifully in my development environment. In production, ...
-1
votes
0answers
17 views

write data to database or write to text file in wordpress

I have successfully developed two versions of the same plugin. One stores data in the database (4 database queries for every site hit), while the second one stores the same data in a text file. In ...
0
votes
1answer
23 views

How does one set cookies in WordPress without getting the ‘headers not sent’ error? within WP

How does one set cookies in WordPress without getting the ‘headers not sent’ error? within WP, I can’t write a cookie that parses a shortcode without getting said error. Please note the snippet below ...
0
votes
2answers
23 views

Only admin should run wordpress plugin shortcode

I have created a simple plugin that locks down content for users not logged in and it is working fine. However any user on a multi-author site could use the same short code in his post to lock down ...
-2
votes
0answers
38 views

How to create a shortcode that displays an anchor link

How can I add this a href code to content in a shortcode? <a href="http://test.com" onclick="window.open("http://example.com","newwin");" target="_blank">Open Two Links With One Click</a> ...
0
votes
1answer
30 views

Return value of $wpdb->update() query in plugin is wrong

The return value of my update query on an empty database table is wrong even though my query syntax seems to be right. The ELSE statement is executed when I run the query on an empty table but no ...