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
5 views
Can I use an array to create multiple tables?
I followed the codex page on how to make tables in the wordpress database with a plugin and was able to understand and get it to work However, the plugin I'm developing has the need for many tables ...
0
votes
0answers
9 views
Wordpress plugin update required not showing in dashboard
I've updated my first plugin (making a branch/tag to tags/1.1.0 from the trunk)
All version numbers are correct in the files and everything shows up on the plugin page as it should. However, the ...
-1
votes
1answer
27 views
Creating Blood Donor Website using WordPress [closed]
I am going to build a website to gather all who are willing to donate blood without any hesitation. Here people can register, manage their profile, post blood request, post articles, receive blood ...
0
votes
2answers
19 views
WP Cron doesn't save <iframe> or <object> in post body
I am using wp_cron to auto grab posts from a remote website and save them in my wp db.
NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
0
votes
0answers
23 views
How to make my plugin theme-independent?
I need a little help and/or consulting for my next steps. (I'm a beginner!)
I've been working on my plugin, using a Custom Post Type "Project", some help from the plugin "Advanced Custom Fields" - ...
3
votes
1answer
39 views
Which action for triggering cron “wp”or “init”?
Which one do you recommend using within a plugin and why?
add_action( 'wp', 'trigger_me' );
function trigger_me() {
if ( !wp_next_scheduled( 'my_plugin_cron' ) ) {
...
0
votes
1answer
18 views
Multiple textdomains
I have a bunch of plugins. Obviously, they all have their own unique textdomains for internationalization (i18n).
I also have a bunch of files that I include in all my plugins - I throw them all in a ...
0
votes
2answers
22 views
Metadata for a taxonomy - is there any WordPress way of doing this?
If I have a CPT "movies" I know I can have various taxonomies eg "Director", but how can I store further information such as "director's nationality" for any one particular director ... or is this ...
-1
votes
0answers
18 views
I want to have the following functionality in Wordpress [closed]
I want to implement the following functionality:
A visitor fills a form.
The form will be saved in the database.
The site will show what the user introduced in a new page.
The user will have the ...
-1
votes
0answers
25 views
get_terms wordpress
I created one PHP class that has a method which is using get_terms() function of word press. Then I am creating the object of that class in other PHP file and calling that method, the method is called ...
0
votes
1answer
15 views
Checking for existing title in custom db query not working
I want to check if the title exists before the wp_insert_post() is triggered.
However, the condition seems not to work as expected:
if( $wpdb->get_row("SELECT * FROM wp_posts WHERE post_title = ...
1
vote
1answer
56 views
Formatting of curly brackets array from WP database to get more readable output
E.g. when I want to edit something in my WP database, I get a headache, literally. Because I see something like this:
...
0
votes
1answer
15 views
How to access function from outside of a class within this class in WP plugin?
I am developing a WP plugin called e.g. DD_Awesome_Plugin and this is my code so far (simplified version without additional code logic within class functions):
class DD_Awesome_PLugin {
public ...
1
vote
1answer
24 views
Allow users of my plugin to define their own shortcode rather than use mine?
I'm creating my first plugin. So far everything is great, but my shortcode is something like this [BIMS] and that acronym might not be easy to remember, or appeal to everyone. I'd like to include an ...
0
votes
2answers
58 views
Borrowing of Previously Translated Strings by Child Plugin
Gist: When writing an extension of a plugin, can the extension "borrow" the translations of the req'd parent plugin by using it's textdomain?
Scenario:
Let's say that there's a parent plugin, whose ...
0
votes
1answer
21 views
Building a simple “settings” plugin to change textstrings on the home page
I am trying to build a little settings area to change the strings of some text (image urls & links) on the homepage via the dashboard.
I have found a useful tutorial which provides the plugin ...
0
votes
1answer
12 views
Redirect url in plugin to somewhere else?
I am using WP-SNAP Extended! v1.0.0 and I want to use this alphabetical menu as a sub-menu beneath my header. I managed to get the alphabetical menu in place, but now, if I click on a letter, it will ...
0
votes
3answers
22 views
How to trigger $_GET request within admin plugin page?
I have this form in my plugin function:
<form method="get" action="" enctype="multipart/form-data">
<p class="submit">
<input type="hidden" name="do_it_hidden" value="run">
...
0
votes
2answers
31 views
How to handle shortcodes through plugin
I learned that I can only put in the code for handling my shortcode through the theme's functions.php
But I was thinking of making it a plugin rather than a theme. How can I achieve that?
4
votes
1answer
152 views
Settings API with arrays example
I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
-1
votes
0answers
14 views
When adding action or shortcode from inside a class, do I reference it with &$this or $this? [closed]
I have a class, a WP plugin that adds actions and a shortcode. However in tutorials I saw the type of referencing the class with &$this and in some other cases $this.
add_action('init', ...
0
votes
0answers
14 views
Maintain custom post types and taxonomies in all themes [duplicate]
When I change the theme in dashboard, activated plugins that use custom post types, stay in the menu. But my own custom post types that I created myself disappear. Logically, It is because I create ...
0
votes
0answers
14 views
Return to Post Editing Screen after a bulk action from the Custom Meta Box
Trying to adapt Custom List Table Example plugin for my own needs.
Here the page field is responsible for specifying the plugin page to which the form containing List Table posts to:
<form ...
4
votes
0answers
104 views
How to write testable classes in Wordpress
I'm currently doing some modifications on the Wordpress plugin that I created in order to make it testable. The problem is I don't know which methods am I suppose to write tests for. I have methods ...
0
votes
0answers
22 views
Front end form submission/processing, without using a template file
I'm writing a plugin which has a front end form that is generated by a shortcode. I'm struggling with processing the form submission in any way. Many tutorials describe placing form processing code at ...
0
votes
0answers
44 views
Wordpress (developer); Wp-Pro-Quiz email the given answers?
I am using the great Wp-Pro-Quiz plugin for my wordpress site. All works great, but i was wondering if it would be possible to send the questions and given answers, once a quiz is completed, to the ...
0
votes
2answers
61 views
Shortcode adding p and br tags
I apologize as I realize this has been asked before and I believe the issue is with wpautop function adding closing p or br tags but every solution I've found has not worked so I'm at a loss for ...
2
votes
1answer
22 views
Scheduling a task using class methods
I need to implement a scheduled task in my plugin, and I tried to follow the examples in the documentation, passing one of class methods as the target. I installed Cron Manager plugin, and I see that ...
1
vote
1answer
26 views
Unit testing wordpress plugins with plugin options
I'm new with unit testing in Wordpress. I managed to setup the unit testing environment using PHP Unit and Wordpress tests but I am having trouble accessing the plugin options that I've set in the ...
1
vote
2answers
35 views
Can't echo get_delete_post_link
I am using custom post_type and inside the loop I echo get_delete_post_link but there is nothing echoing.
<?php
$wpquery = new WP_Query('post_type=myposts');
if( $wpquery->have_posts() ) {
...
1
vote
1answer
50 views
Plugin fatal error
I'm trying to activate a plugin I made on a network site. I'm getting an error:
Plugin could not be activated because it triggered a fatal error.
I have the debug mode on and it outputs all errors ...
0
votes
0answers
15 views
WordPress Popularity Score relative to all posts (score views, shares and comments)
I am trying to find a solution to score my posts in an effort to visually represent how "hot" they are, relative to other posts, or relative to a score of 1.
I have views, total shares and comments ...
0
votes
1answer
34 views
Wordpress plugin with its own “site”/theme
I am currently starting a plugin development project and ideally I'd like the plugin to run using its own custom theme as if it was it's own separate thing.
Is it possible to include a theme within ...
0
votes
0answers
29 views
Get page type to display content
I have some checkboxes to select where can I display my plugin and I save in db in this format:
Show popup in this pages:
x Article (Public)
x Pages (Public)
x File (Public)
x Revisions (Not ...
1
vote
1answer
32 views
How do I handle multiple Submit buttons in plugin's option page?
I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out ...
3
votes
2answers
85 views
Creating a Custom Post Type as a Plugin? Why?
I've been experimenting with creating a Custom Post Type as a plugin (because I've seen this recommended in various places).
But I have a question not about the how, but rather the why of building ...
5
votes
1answer
70 views
Add screen options to Plugin pages
I want to add screen options to my Plugin page, like the ones that are available in the Dashboard.
I tried using the add_option method of the WP_Screen object and found that it supports only two ...
-1
votes
0answers
21 views
Can someone use my plugin code for their plugin? [closed]
I understand that wordpress works including plugins and themes need to be GPL compliant. If I release a premium paid plugin with GPL license, does that allow someone else to copy my plugin code and ...
0
votes
2answers
41 views
Enqueue scripts inside a class in a plugin
I have a plugin like this:
<?php
/*
Plugin Name: MyPlugin
*/
class MyPlugin
{
public function __construct()
{
add_action('wp_enqueue_scripts', array($this, 'enqueueAssets'));
}
...
0
votes
1answer
52 views
Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
I have been beating my brains on this one for days now and my Google-fu is failing me.
I have created a custom meta box with a dropdown menu that lists all of the terms from a custom taxonomy. What I ...
0
votes
1answer
41 views
Why is the Settings API is not saving my array of options
I am writing a set of classes to easily create options pages accessible via submenus of the standard WordPress menus and a way to easily create options for said menus. The way I am wiring it is via a ...
1
vote
1answer
38 views
Is it possible to create Custom Post plug-in?
I understand that Wordpress allows you to create Custom Post Types with Custom Fields, but is it possible to create a custom Plug-In that creates and maintains its own Custom Post type (outside of ...
6
votes
1answer
198 views
How to create an API for my plugin?
I have been developing plugins for WordPress. Most plugins I have developed with two three classes and not so huge like Buddypress, WooCommerce or etc.
I am planning to make two open source plugins ...
1
vote
1answer
30 views
Add Additional File Info (jpeg compression & file size) settings to Edit Images Screen
On the WordPress Edit Image Screen, I'd like to add a label to show the current compression level and byte file size of the image.
Any ideas how to tap into this screen and echo this data?
The ...
2
votes
1answer
39 views
WordPress plugin installation
I am using the simple add_filter function to output the content.
add_filter('the_content', 'my_name');
function my_name( $content ){
// code
return $content;
}
When I activate the plug-in ...
-1
votes
0answers
19 views
How to add second email into billing page in WooCommerce?
I'm new to WooCommerce and PHP, so I've faced problem. Now by default after user has checkout he recives a latter with a list of things he ordered. Now I need to give a customer abuility to send that ...
0
votes
1answer
34 views
Why enqueue styles on hook
Why do we need to enqueue styles on a hook, why not just enqueue them straight in like this?
wp_enqueue_style( $handle, $src);
the codex page gives an example of using a hook but doesn't explain ...
0
votes
1answer
28 views
Delete data from custom table when deleting a post
I want to delete post id form my custom table, when deleting a post. I have tried this way, nothing happened. Please help.
add_action('delete_post', 'delete_data');
function delete_data($post_id) {
...
0
votes
1answer
39 views
Fetch the input type date value via ajax
I am new to ajax and I've been struggling for 3 days now on how to solve my problem. I am trying to fetch the value of the date input (input type="date" in html)and pass (post method) it to ajax so ...
0
votes
3answers
36 views
How do I change the image from the default mysteryman in the WP Profile page
I work for a company that has recently added a plugin for WordPress. We have a company profile page, as the plugin owner, and we want to change the image from the the default mysteryman to a logo. I ...