Questions tagged [plugins]
Plugins are tools to extend the functionality of WordPress.Use the tag to mark questions related to issues and bugs faced in the plugin or its improvement. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.
728
questions
11
votes
3
answers
43k
views
How do I get WooCommerce to automatically recreate pages? [closed]
I had to uninstall WooCommerce plugin (I deleted the tables it created as well) and now I reinstalled the plugin and I doesn't automatically recreate the WooCommerce Pages. Am I stuck having to ...
11
votes
4
answers
32k
views
How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
The current result is "PHP Fatal error: Call to undefined function wp_get_current_user()" which makes sense, but doesn't help.
I need to use $current_user.
Here is the code I'm currently using:
$...
11
votes
3
answers
30k
views
How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 3.0 and up?
I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this :
http://www.dbuggr.com/smallwei/add-wysiwyg-editor-tinymce-wordpress-plugin/
and ...
11
votes
1
answer
6k
views
How to not allow users to create new tags, but allow to them to use existing ones
I want a certain role to be able to add new tags, but other users should just be able to use the text bar to search for existing tags.
I know I can hide the tag bar in the sidebar, but I don't want ...
11
votes
4
answers
3k
views
How can I delete orphan keys in WordPress database tables?
In particular in table wp_options. After almost 2 years of blog production it seems increased a lot, and I don't know how many crap is in there.
Do you know a plugin that works with WordPress 3.0 or ...
11
votes
4
answers
26k
views
How to delete all records from or empty a custom database table?
I can't seem to find a simple reliable way to do this - perhaps?:
// delete row ##
global $wpdb;
$delete = $wpdb->query(
$wpdb->prepare(
"DELETE * FROM `wp_table_name`"
)
);
...
11
votes
5
answers
124k
views
Error: call_user_func_array() expects parameter 1 to be a valid callback
I have issue after upgrading my wordpress to 3.6 see below for errors which displays on wordpress admin panel not on front of website.
Warning: call_user_func_array() expects parameter 1 to be a ...
11
votes
1
answer
80k
views
WooCommerce: List All Categories
I'm using the WooCommerce plugin with WordPress and within my theme I'd like to list all categories within a navigation menu with PHP.
I've tried using woocommerce_product_categories();
but I don't ...
11
votes
2
answers
12k
views
How to Add a Third Level Sub Menu to the Wordpress Admin Menu
Is there a function, action or filter that I can use to add a third level drop-down menu to the WordPress admin menu.
For instance, right now in the sidebar menu, there is a menu for posts and under ...
11
votes
1
answer
18k
views
Woocommerce: assign an "author" to a product
I'm developing my first theme for woocommerce.
I need to be able to have "authors" (really "designers") assigned to woocommerce products. Is that feasible? I was thinking of using the wordpress ...
11
votes
1
answer
13k
views
wp_dequeue_style not working
So I am trying to get rid of a font that a plugin is loading on the front end as I am already loading it myself and it loads every style of the font which I don't need.
Here is my code:
//Remove ...
11
votes
2
answers
3k
views
Media library - Limit images to custom post type
Is there some wordpress magic/plugin that will make the media library only show images that were uploaded to a specific custom post type?
I have a custom post type called "artists", I want, when admin ...
10
votes
6
answers
4k
views
What are the best practices for updating?
Don't want to do anything to take down my blog. Here are some upgrade-related questions:
How often should Wordpress be updated?
What is the best way to do it?
How to know if there is a problem with ...
10
votes
4
answers
2k
views
Is there a WordPress plugin that registers a plugin file as a custom page template?
I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?
10
votes
3
answers
246
views
Generate dormant hook references
It seems a lot of plugin developers take the time to add filter/action hooks to let users tweak their products’ functionality. Which is great, but what they often don’t do is provide a list of hooks ...
10
votes
1
answer
8k
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 ...
10
votes
3
answers
10k
views
Difference between a theme and a plugin?
I'm curious as to what the specific differences are between a theme and a plugin. I get the gist of it...themes have to do with look and feel (html / css) and plugins have to do with adding ...
10
votes
2
answers
37k
views
How to get home page ID?
I'm building a Wordpress plugin in which I need to get the HOME page ID value.
Do you know how can I get it?
I know that we can get the current ID with the_ID() or get_the_ID() function, but I need ...
9
votes
8
answers
17k
views
Is there a way (plugin?) to restrict a user to being able to edit just one page?
We use wordpress like a CMS and would very much like to allow users to have a "homepage". Ideally they'd be prevented from mucking up the whole site.
Is there a simple way to limit users editing ...
9
votes
4
answers
8k
views
dealing with large HTML output via plugin code
I recently wrote my first WP plugin that adds a shortcode for embedding a custom jquery image gallery into posts. It's primarily just dumps a good chunk of HTML into the post, along with javascript ...
9
votes
5
answers
6k
views
How can I create a bash install script for my Wordpress sites setup (WP+plugins+theme)?
I build a lot of websites with Wordpress, and my initial setup is basically always the same :
Latest version of WP
Latest versions of about 5 plugins
My naked development theme
Instead of ...
9
votes
3
answers
49k
views
Create a table in custom plugin on the activating it?
I'm trying to create a custom plugin where I want create a table when the plugin gets activated. I have tried the following code but it is not creating the table in the database
function ...
9
votes
1
answer
6k
views
What are the package and subpackage comment for?
This is included in themes and plugins.
/*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
What are they for? I've read that they are standard and so on, but what is the ...
9
votes
3
answers
15k
views
How to set back-end language per user?
I would like to use the english interface for the back-end but I would like to set it to native language for an editor. I know WPML has this feature, but I don't want to install the unsupported WPML ...
9
votes
7
answers
34k
views
WooCommerce store with ~30,000 products [closed]
I'm investigating WooCommerce as a potential e-commerce solution, however my immediate concern (which I haven't been able to find information on) is the number of products.
The proposed store needs ...
8
votes
2
answers
867
views
How to get a variable number of posts per post type on the main loop?
I'm looking for a way to balance the content at the homepage of my blog:
the blog has a few post types like Poscasts, Videos and Blog and I'd like to have let's say 10 Posts on the homepage, but I'd ...
8
votes
1
answer
9k
views
Correct way to serialize the data of options table?
I am writing a plugin and it require around 15 different options so I am using php serialization. I'm doing it by an array and update option with php serialize functions.
but when I access it from /...
8
votes
3
answers
10k
views
WordPress sharding: which multi-DB plugin to use?
I've got a WordPress multisite installation that's hosting enough blogs I need to shard the database. I see there are three plugins available to spread WordPress across multiple databases:
http://...
8
votes
1
answer
223
views
What is right way to go about adding functionality to a published WordPress plugin?
So I looked all over to try and find some kind of rules, or at least some common-courtesy guidelines, concerning this issue and couldn't find anything.
Essentially I'm wondering what I should do when ...
8
votes
2
answers
29k
views
How can I call a function from one plugin within another plugin?
I have a basic plugin in the admin options panel for events.
I want to call a function that is from a different social media plugin (Mingle). I can call the plugin functions in the theme, but not ...
8
votes
4
answers
3k
views
Security and .htaccess
About a month ago I started a WordPress blog on a hosted server related to a hobby. So, I am new to this at present.
Since I'm concerned about security, one thing I did was to install the plugin WP ...
8
votes
1
answer
5k
views
How to share category taxonomy with custom post type (The Event Calendar plugin)
I have a custom post type 'Events' created by The Event Calendar plugin. It has registered it's own custom taxonomy. Is there a way I can assign the regular WP post categories to some of these events ...
7
votes
1
answer
16k
views
Add a subitem to Woocommerce section
I want to add a subitem to "Woocommerce" parent item, below "Orders", this subitem is a custom post type.
I tried to use (in $args):
$args = array('show_in_menu' => 'edit.php?post_type=shop_order'...
7
votes
1
answer
5k
views
Creating 20,000 Posts or Pages using a .csv file?
Here's my challenge: I have a .csv file which contains 20,000 rows of data.
Each row contains 5 columns of data on an particular individual.
I need each row (each person) to be populated into a ...
7
votes
1
answer
1k
views
Experiences with adding Nonces to the comment form
I was wondering about the impact nonces would have on the default comment form a theme has. Because Nonces are a built-in feature of WordPress I thought about giving it a try.
Does somebody has ...
7
votes
2
answers
8k
views
[Plugin WPML] : How to create a translation of a post using the WPML API?
I'm trying to figure out how to create a translation for a post using the internal WPML API (inc/wpml-api.php)
I simply want to create a translation for post ID xx, set some content and publish it.
...
6
votes
2
answers
18k
views
How to add plugins to wordpress theme?
I planned to develop wordpress themes commercially.. I just want to know the easy method to add plugins to my wordpress theme which I am developing.. can any one suggest me the simple steps.. and I ...
6
votes
3
answers
6k
views
Prevent trash/delete action on specific post types
Edit:
In a plugin I am developing, I need to store payments, IPN and transactions for customers in both frontend and backend. However I am concerned that the admin will use his actions power to ...
6
votes
1
answer
3k
views
Gutenberg: Error loading block: Invalid parameter(s): attributes but it can be used in the code
I managed to get an attribute working in my plugin. Well, sort of. I can read and write the attribute props.attributes.content . But I get the message in the Gutenberg block itself:
Error loading ...
6
votes
3
answers
2k
views
How to add "Stick this post to the front page" to front end?
I have a baseball related website with multiple authors. I use the "Stick this post to the front page" to denote an "Editor's Pick" on an article. I would like to add a link/button to allow editor to ...
6
votes
3
answers
9k
views
List of all existing WordPress plugins
Is there a place from where I can get a list of all existing WordPress plugins, located in http://wordpress.org/extend/plugins/
I am trying to test my website for vulnerabilities and need such list.
...
6
votes
2
answers
289
views
Creating Unique Post URLs for A/B Testing... Is this even possible?
I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing ...
6
votes
3
answers
4k
views
Creating two database tables via plugin
I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips.
In Codex it suggests to use an if statement to see if the table has ...
6
votes
1
answer
7k
views
Archive list with only years and months
I'm trying to show the archive list like that
<ul>
<li>Year</li>
<li>Month</li>
<li>Month</li>
<li>Month</li>
<li>Year</li>
<li>...
6
votes
5
answers
3k
views
How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
I'm working on a site that requires an https secured admin area and a secure front-end area as well where private information will be shown. My preference for user login is an Ajax-enabled widget that ...
6
votes
2
answers
26k
views
How to only hook on Single.php after content?
I am currently hooking on the_content() but that goes through the Wordpress loop too. How can I only hook on the Single.php page?
Also, is there a way to only look on the first X posts in the ...
6
votes
1
answer
797
views
Add custom menu item type
Is there a way to add custom menu type to the menu editor? I know I can add items dynamically with the wp_get_nav_menu_items filter, but I would like to have the position of those items configurable.
6
votes
2
answers
8k
views
Publish author posts only with editor approval?
I run a multi author blog and i am looking for a non plugin solution.
The default author user role in Wordpress can publish posts without any approvel - look at Role Capabilities Wordpress Codex. ...
6
votes
5
answers
9k
views
Removing the "Your backup folder MIGHT be visible to the public" Message Generated by the WP-DBManager Plugin
I upgraded a client's WordPress from 2.8 to 3.0.1 and after upgrading I am now receiving this message in the dashboard:
Your backup folder MIGHT be visible to
the public
To correct this ...
6
votes
1
answer
12k
views
Run WP-CLI using PHP
I've installed WP-CLI on the Mac and my next step is to execute WP-CLI commands using PHP script.
I've tried to implement it the following way but I do not see anything happening. Can someone please ...