Questions tagged [plugins]

Plugins are tools to extend the functionality of WordPress. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.

Filter by
Sorted by
Tagged with
5
votes
1answer
2k views

How does Wordpress handle MySQL row lock errors?

If there is a WordPress plugin which updates rows in a custom table, but that update encounters a row lock, what happens? E.g. two users simultaneously fire an update on TABLE1, one setting AGE=1 and ...
5
votes
1answer
6k 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 /...
5
votes
3answers
22k views

Display products from specific category in shop page

I know many people asked for this question but I didn't find a proper way to do it. How to add a simple meta_query (product_cat) before the execution of the shop page's query. Maybe by using a filter ...
5
votes
2answers
2k views

Wordpress plugin from own server

I am developing a game, and I am planning that, I will have partners, so they can run a game like mine. For this, I developed a plugin, with some classes, and functions, to handle the game requests. ...
4
votes
5answers
21k views

Make thumbnails in woocommerce replace the main image instead of opening fancybox

I would like the thumbnails underneath the main image on the single product page to replace the main image when they are either clicked or on hover, I prefer hover. Right now the thumbnails just open ...
4
votes
3answers
3k views

Cannot install plugins even though www-data has write permissions

All the files in my WordPress path are owned by myuser:www-data and Apache is running as www-data. All files and folders have group write permissions, e.g. -rw-rw----, but I keep being prompted for ...
4
votes
2answers
7k views

Does wordpress have a post hit counter?

Is there anyway to show in a template for a post, how many times that post has been viewed, like hits without some sort of plugin? It seems wordpress would have this built in, but I am unable to find ...
4
votes
1answer
11k views

Add Rewrite Rule for custom page

Was trying to create author specific page with author specific URL and it was working fine,but when i created this URL did not taken in to account following 2 factors Author Name Conflict (similar ...
4
votes
1answer
1k 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 ...
3
votes
3answers
6k views

Is there a way to display Woocommerce nav filter widget filters for shop page in all headers?

I'm trying to display the Woocommerce nav filters on the home page so visitors can filter all the shop products from any page (when they hit the filter they will be taken to the shop page as usual). ...
2
votes
3answers
1k views

Custom comment type maybe?

(First of all, sorry for bad english) If there are people here using wordpress as cms, you probably realize that you dont need comment system that much. Esspecially custom post types like products ...
2
votes
2answers
1k views

Wordpress Enqueue Script Chaos (jQuery & Foundation.js)

I've been working on building a theme for the past couple days now, and I've run into a wall. While I originally included foundation.js as an enqueued script, I couldn't remember why I had added it. ...
2
votes
1answer
2k views

Plugin uninstall: why run dbDelta after $wpdb->query($drop_sql)

i am reading professional wordpress. their code for uninstalling a plugin is //build our query to delete our custom table $sql = "DROP TABLE " . $table_name . ";"; //execute the query deleting the ...
2
votes
1answer
3k views

How to get user-meta from Social Login registered users?

It looks like social login plugins (such as Wordpress Social Login, OneAll etc.) do not create users in the original wp-database as regular registration from Admin dashboard. Hence it is not possible ...
1
vote
3answers
3k views

Best way to inject css into admin_head in plugins?

I'm looking for the best way to inject CSS into WordPress' Admin CP. Currently, I'm using the admin_head action hook and in this hook, I'm using dirname( __FILE__ ) to retrieve the directory for the ...
11
votes
7answers
12k views

How can I find plugins' slug?

I'm wondering how can I find plugins' slug (slug = internal name used by WordPress to do plugin updates and to determine which plugins are currently active)? It is usually plugin's folder name but if ...
7
votes
1answer
750 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 ...
5
votes
2answers
12k 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 ...
4
votes
3answers
55k views

Show all products on one page with WooCommerce

I have WooCommerce running on this store. Although the default is to show 12 products on a page the client has asked for a "show all" button that will prevent the user having to use pagination to get ...
4
votes
4answers
2k views

How to disable Gutenberg editor?

As the 5.0 is getting real, and so is Gutenberg... Is it possible to disable Gutenberg and use previous TinyMCE editor? How to do this?
4
votes
1answer
390 views

Autogenerate wordpress shortcodes using array?

I was create a shortcode which automatically generate shortcodes with given array key and value. Function names does not generate dynamically. Note: Array KEY = ShortcodeName and Value = Wordpress ...
3
votes
2answers
5k views

How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?

Can anyone explain how to interpret and make sense of the active_plugins option_value string in WordPress. And then use this string/ array to disable and activate specific plugins? Here is an example:...
3
votes
1answer
1k views

How to show custom message once on plugin activation?

I know by watching the akismet plugin source how to show a custom message on the plugins page, but I want my message to appear only once after my plugin is activated. How could i do this?
3
votes
3answers
43k views

How to have Wordpress send a user confirmation/validation email on signup

I have a WP 3.3 installed and running great. My client would like to confirm a valid email address by sending the user a confirmation email containing a link to "confirm". I have played around with ...
3
votes
1answer
9k views

How to solve a conflict between a plugin and a theme?

I'm using Photospace as a gallery slider within my hatch pro wp theme (you can check here). The default transition effect between slides is a crossover effect (like this example), but the effect in ...
3
votes
2answers
19k views

Woocommerce -How to set product regular price default

I am using woocommerce at work for equipment requests, therefore all products I will create will need to be £0. Is it possible to set a default value of 0 for the regular price field on the add ...
3
votes
0answers
758 views

How can I get an image from the uploads dir and enter it in the media library? [closed]

I want to develop a script that: Gets an image from a post's content and removes it (it's hosted on another website) Uploads it in the uploads directory Adds it in the media library and Lastly ...
2
votes
1answer
2k views

Tracking last login and last visit

I'm using the code below to track when a user last logs in. I'm realizing though that if they checked the Remember Me option, this won't track their last visit. // Catch the time they login and save ...
2
votes
1answer
4k views

Woocommerce: change user role after completing order

:) I'm using wordpress with woocommerce, and I would like to automate the following step. When an order is completed, I would like to change the user role associated with that order id from 'customer'...
2
votes
4answers
1k views

Survey plugin recommendations [closed]

What is a good plugin to do surveys for wordpress. I can think of creating a custom contact form 7 - but i was having problem in the formatting and separating it from the body of the post visually. ...
2
votes
2answers
957 views

Rename existing old uploaded images containing accented French characters (not during upload)

Need to update 1,000+ images which have French characters in them. The following worked for a test post: Created a copy of the image without the FR characters Updated file name inside the ...
2
votes
1answer
5k views

Register Custom Post Type from Plugin

I'm trying to register a CPT from a plugin upon activation but seem to have hit a wall... Anyone see anything im missing? I don't get any errors but the CPT doesn't show up in the dashboard links.......
2
votes
1answer
495 views

Built in admin ajax hooks?

I'm developing a plugin and using regular hooks and filters. However, I'm now trying to bind my function to responses from WP's admin ajax calls. For example, in the Plugins Add New screen I would ...
1
vote
2answers
5k views

How to list the Hooks and order of execution in current loading page? [duplicate]

I need to know the list of hooks that are called in the current page . How to identify the priority assigned to the action and filters in the action . If i want to remove the default action on word-...
1
vote
2answers
2k views

Which hook callback has priority if both plugin and theme use the same hook?

If a theme and a plugin uses the same action hook, for example comment_form is used by both theme and plugin. Then , which one will be called first? the function associated with the theme's hook or ...
1
vote
1answer
1k views

Plugin to set all Posts in a certain Category to a certain Post Format

I want to setup my WordPress so that whenever I create a post with the category "Tweet", my wordpress installation automatically changes the post format from post to aside. This will help me because I ...
1
vote
1answer
5k views

How to fetch serialized data from wordpress options

I have the following serialized data in a wp option a:2:{s:5:"Title";s:11:"your title";s:7:"Message";s:20:"Hola testing testing";} I would like to return it to be used in a form, and show it also in ...
1
vote
1answer
3k views

Load WooCommerce templates from my plugin folder first

I try to write a plugin for WooCommerce (https://github.com/bassjobsen/woocommerce-twitterbootstrap). I want my templates load like this: my custom theme / template path / template name my custom ...
1
vote
1answer
764 views

Automatic updates not working/plugins not installing

I am trying to run an automatic update from Wordpress 3.0 to 3.02. However, I get the following error message: "Unable to locate WordPress Root directory. Installation Failed" I also cannot ...
1
vote
3answers
584 views

Good tools for locating hooks in a wordpress page/admin interface/blog post?

I've recently started using the Hikari Hooks plugin for Wordpress as it seems to allow you to get a good idea of what do_actions are being called on the page, so that you can easily find out where ...
1
vote
4answers
15k views

woocomerce variations [closed]

I am using woocommerce plugin for ecommerce site. Problem is that it allows maximum 50 variations for a product, but my client requires around 350 variations with attributes size, color etc. etc. Is ...
1
vote
2answers
1k views

Prevent page slug from interfering with custom post type archive permalink?

In my plugin, I'm creating a custom post type that has an archive and uses the rewrite parameter to choose a slug: $args = array ( 'public' => true, 'has_archive' => true, 'rewrite' ...
0
votes
0answers
1k views

Activate Plugin which is in subfolder?

I try to activate the plugin inside the plugin folder is possible ? I am adding the absolute path of the plugin as something like I have a folder as main file and subfolder contain another plugin ...
0
votes
3answers
3k views

Check out Attribute on WooCommerce

I am using WooCommerce on one of the site. I need to add one more field at the time of checkout to ask buyer wheteher to issue Invoice on his name or the name of his business? Any advise how to do ...
0
votes
2answers
4k views

wp_schedule_event / cron_schedules - custom recurrence time not working in Plugin

I am trying to add custom intervals for the WP cron in a plugin. It run with "hourly", "daily" default recurrence time. It dont' run when I add my own custom recurrence time for the function ...
0
votes
1answer
806 views

Help With A Reverse Pagination Plugin

I saw this presentation about why pagination on the Internet is weird. https://speakerdeck.com/u/espylaub/p/pagination-on-the-internet-and-why-its-weird It inspired me to try and make a WordPress ...
0
votes
3answers
567 views

append stylesheet via shortcode

Wondering how I can add a stylesheet to wp_head section via shortcode, since shortcodes are parsed after wp_head, I've hearing about output buffering but I Am not sure. Any idea?
-1
votes
4answers
20k views

Is there any multiple filter/criteria plugin for wordpress? [closed]

I'm interested in a wordpress plug-in that is able to make from tags or categories multiple search criteria like left hand side of the following site system http://www.olx.com/dvd-cat-238 When one of ...
11
votes
3answers
41k 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 ...
8
votes
4answers
11k views

How to make plugin required in a wp theme without using php conditional statements when calling an individual function from that plugin?

One of my Wordpress themes requires a few third party plugins to run correctly. Most of the times I used to call functions from third party plugins using conditional statements like if(...