Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

1
vote
0answers
8 views

Update results, Before deleting the related category

There is a DB that contains 2 tables posts and categories, Each category could contain many posts, So I'm using one-to-many relation between the two tables. Using the id of the categories and a ...
0
votes
1answer
30 views

What's the better way to add an inline script?

What's the better way to add an inline script in WordPress theme or plugin? Is it by the function wp_add_inline_script, or using the hook wp_footer? and why?
1
vote
1answer
16 views

prevent showing posts of an specific category in admin posts section

For some purposes I made a plugin that automatically makes posts with a specific category. Now in admin posts section, posts with that specific category have been too plentyfull and finding other ...
1
vote
0answers
19 views

Storing data in wordpress database from ajax call from different website

What I am trying to do is that, I am providing users with embed code for videos...now with these embed codes I am sending a number, once the user watches the video, I am sending that number back to my ...
0
votes
1answer
24 views

Why is my WordPress Plugin page requesting my FTP Login Credentials?

I run my own VPS, which hosts multiple WordPress websites. When it comes to adding/removing Plugins via the WordPress Dashboard, I have never had a problem. For one of my domains, I wanted to ...
0
votes
0answers
19 views

How to show a splash screen from my plugin?

I am writing a plugin that user can import Wordpress XML files remotely. And in my environment I decided (described below) to postpone the process till the first visit. The importing process works ...
0
votes
0answers
10 views

Private Client Page

I'm not a developer, nor know the basics of proagramming and have been looking for a plugin that can give me a page for each individual client that I can put reports on and other things like Google ...
-3
votes
0answers
9 views

INSERT DISTINCT country_name to wp_tableName [on hold]

I want to insert Unique Name of country to table I have ID auto increment and column country_name If someone insert one country name it should not insert again.
2
votes
1answer
14 views

Unable to load stylesheets and scripts to plugin settings page

I have the following code in my main plugin file: <?php /* Plugin Name: Awesome Slide Show */ add_action('admin_head', 'wp_ss_plugin_include'); add_action('admin_menu', '...
2
votes
1answer
37 views

Modifying values with add_action to be sent to db

I am struggling with this problem for hours now, what is going on is that somewhere before inserting the values into the db, this action is being called. do_action_ref_array('h5p_alter_user_result', ...
0
votes
1answer
14 views

Override theme's WooCommerce file

Normally we can add WooCommerce files to the theme so that it will override the default WooCommerce files. But I am developing a plugin which is having some extra feature to the WooCommerce page and ...
0
votes
0answers
14 views

WordPress TinyMCE Editor plugin not copying values from input boxes into shortcode. Displaying VALUE=“undefined” for each

I am building a custom plugin on WordPress to insert a [video_embed] shortcode with two attributes ("id" and "border"). The button for the TinyMCE editor that I have created is working but does not ...
2
votes
1answer
26 views

Plugin activation error due to unexpected output

I am getting the following error when I activate my plugin: The plugin generated 22 characters of unexpected output during activation. If you notice “headers already sent” messages, problems ...
2
votes
0answers
22 views

Hook into theme-switching later than `setup_theme`

I need to add a theme-switching logic to a site. Unfortunately, what I've tried already doesn't seem to work as required. The themes needs to switch based on whether the user is on the blog part of ...
0
votes
0answers
10 views

How we can Send New Posts through wordpress to Whatsapp Groups/Broadcast Automatically? [on hold]

I want to Setup a feature whenever we will publish a New Posts at my wordpress Blog then it will be automatically send to my Whatsapp Groups/broadcast. Even some information regarding this are ...
0
votes
0answers
20 views

WordPress Cron - Long running process on shared hosting environment

I have a question which I wasn't able to resolve. I'm developing a plugin, and I have a long running cron task, in a nutshell I'm scraping some data from external urls and after that I am adding that ...
-2
votes
0answers
18 views

Boilerplate doesn't install on localhost

I am developing a plugin and after long time working I want to start it all over again with better code and some more improvements. So.. I intend to start the same way I did before. Using the Tom ...
0
votes
1answer
11 views

Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?

I have a requirement to add certain posts (marked with a tag or category) from "site a" to another site ("site b"). I think the best way would be for site b to periodically check site a for the ...
0
votes
0answers
9 views

add seperate suffix for low price and high price in woocommerce

just trying to figure out how to add a suffix to prices that are lets say: $10 - $100 on the shop page to something like: $10 (a) - $100 (b) the only thing i found makes it $10 - $100 (a) - (b) ...
1
vote
2answers
52 views

How to make WordPress plugin check for database changes and then do something?

How do I for instance check if there is written a new comment in the database and then make my plugin register that there have been a change? I will use this information to do something in the ...
-2
votes
1answer
31 views

I'd like to add a button under the “Add to Cart” button which says “Buy on Amazon” and links to my Amazon product page [closed]

I'm hoping for some "additional CSS" I can add to my WordPress customization to get this extra button on my product page!
0
votes
0answers
32 views

Add Custom Woocommerce Post Status [closed]

I cannot seem to find any information about Woocommerce Post Statuses. I'm trying to add something like whats in the red box below. Also, how would I pull back or push custom information into a ...
1
vote
0answers
21 views

Get Time Taken By Each Action Hook in Wordpress

I am developing a Plugin, and want to record Time taken by each Action Hook, I am able to get all the Hooks Triggered on a Page with the Action and Priority, but i am unable to get the Time taken by ...
-1
votes
2answers
22 views

Error 404 blog/page/2/

Hello i have problem. I can't view /blog/page/2/ i klick "_posts_link" and error 404 shows me Blog Page -> home.php <?php $paged = (get_query_var('paged')) ? ...
1
vote
1answer
26 views

How to make my custom widget appear within WordPress widgets? Plugin development

This is my first WordPress plugin ever, so i'm a little noob. But why is my widget not showing within all the other widgets in my WP-Admin interface? It should be visible when i activate the plugin. ...
2
votes
1answer
22 views

Can't get JS code to work with shortcode

I am trying to create a plugin and I've got stuck. I am trying to register and enqueue a script from a shortcode: This is my shortcode: add_shortcode( 'gear-guide', 'gg_product_front_end' ); This ...
1
vote
0answers
32 views

OOP and WordPress Plugin Development - Instantiating Objects [closed]

I am confusing with OOP and WordPress. It would be nice to get some advice. I have this files: some-plugin.php (WordPress plugin main file.) includes/class-autoloader.php (A custom autoloader that ...
3
votes
1answer
41 views

Is their any way to Extend WPDB class and Overwrite the Default Query Function

I am trying to get the Query data with backtrace by extending the wpdb class and overwriting the Custom query function. The code is working fine if i Create a Symlink of db.php but is not working ...
-2
votes
1answer
21 views

Forcing the Uninstall Hook to fail

A client is paying good money for a custom plugin. I want them to have the ability to deactivate it if needed (testing) but I'm worried that they might accidentally hit that "delete" link by mistake. ...
0
votes
0answers
16 views

The plugin generated 198 characters of unexpected output during activation. If you notice “headers already sent” messages… ,

The plugin generated 198 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing ...
-2
votes
0answers
31 views

Is it possible to override a plugin feature with a Wordpress theme feature

So I have a Wordpress blog based theme that I am working with. I have some basic knowledge of CSS and HTML but am relatively new to this. The plugin that I am working with uses the Wordpress blog page....
-1
votes
0answers
29 views

Calling get,add,update, or delete _post_meta functions break's the PHP script with error code 500 [duplicate]

I am attempting to make a plugin that when $_POST data is received, it will decode the JSON table from $_POST and use that to update the post_meta for the given post. Data from the JSON table comes in ...
1
vote
1answer
83 views

Logs to check when the plugin was first installed for the first time

Is there a way to check when for the first time a particular plugin was installed in the WordPress? I need this information to prove my integrity somewhere.
0
votes
0answers
24 views

add_rewrite_tag show Hello World blog post in all pages

I have add add_rewrite_tag function in my theme function file & its working fine where I need it, But its show hello world blog post on other post and pages. add_action( 'init', '...
0
votes
1answer
75 views

How to seperate posts by categories?

I have CPT called "investment" and I want to display all the posts in that CPT by it's category. I'm doing that via shortcode. e.g. [myshortcode type_of_post="investment" cat="12,30"] and I want it ...
0
votes
0answers
21 views

How to apply filter from text area

so i'm writing a wordpress plugin and need some insight on getting a problem of mine solved. Any help is appreciated. So i have my plugin options page with a textarea (option field) and a save button....
-1
votes
0answers
29 views

wp_logout_url($redirect) is giving warning

I have a front end login system in which after clicking the logout the user will be redirected to login page or home page but the wp_logout_url($redirect) is not working an giving an warning saying: ...
0
votes
0answers
28 views

Trying to Add Admin Page to WP Plugin Boilerplate

I'm trying to add an admin page to the WordPress Boilerplate Plugin. I've looked at dozens of articles on the Codex, tutorials, and even this video... However, I have been unable to see an admin page ...
0
votes
0answers
12 views

Is wplink error “Cannot read property 'selectionStart'” solved?

I am trying to integrate the wplink function into my custom post type using custom fields. Unfortunately, I am facing following problem: Uncaught TypeError: Cannot read property 'selectionStart' of ...
0
votes
0answers
7 views

Can not write to the username field created with wp_login_from()

Hello guys I am having a wired problem in my front-end login page. I have called wp_login_from() with simple arguments but when i am trying to write something to the username field the mouse is not ...
0
votes
0answers
17 views

How to roll back a wordpress plugin update via PHP function

I'm wordpress developer and want to add roll back to previous version or some other subversion inside one of my plugins. I tra to Google this but neverfind workable solution. Do anyone have idea how ...
2
votes
1answer
41 views

Create table in database when activating plugin

I am building a plugin and I am trying to create a table in the database when the plugin is activated. I followed this guide and came up with this code: function gg_create_table(){ global $wpdb; ...
0
votes
1answer
22 views

How to Use A Custom Post Type as Taxonomy for Another Custom Post Type

Having: I have two Custom Post Types; one is called movies with some detailed meta-boxes. I also have another Custom Post Types called directors again with some detailed metabolites like [name, ...
0
votes
0answers
33 views

Hide a specific plugin

i am using this Gist https://gist.github.com/carlodaniele/5b8343dd17a64c69d04459bffad2312c This works fine, but the problem is i do not want to disable a plugin for a specific page, instead of i want ...
-1
votes
3answers
29 views

Trying to build a plugin - Cannot modify header information

I am trying to build a plugin and at the moment my plugin contains only plugin.php file. There is not a real code in it yet: <? /* Plugin Name: Plugin Name Plugin URI: https://www.example.info ...
0
votes
1answer
16 views

Prevent WordPress automatically processing certain URL queries

I'm coding a custom plugin for a client and I want to use certain $_GET variables in the URL in my custom pages, such as ?s=$1, ?p=$1 and ?paged=$1. With some of these variables, such as ?paged=$1, it ...
1
vote
1answer
20 views

How to export post 2 posts Wordpress plugin data [closed]

I have an old website which uses the post 2 posts plugin (https://wordpress.org/plugins/posts-to-posts). The plug in has been used to set up many relationships between custom post types. However I am ...
3
votes
0answers
29 views

Yoast SEO blocking longer running process

I have created a custom plugin, the job of which is to calls an external API to fetch data and fill in some custom tables in WordPress database. This is really a long-running process (maybe over 30 ...
5
votes
3answers
155 views

Init action hook running late after PayPal's return url?

I have process_ipn method that runs on init action hook. Looks like it is fired after PayPal returns to merchant. Under this method, I could find out the payment status such as completed, pending, ...
0
votes
0answers
22 views

Artist website: Want to filter between available stock and “sold” stock

I have an artist who has a wordpress website. We would like to have a page called "artworks" and a page called "recently sold artworks" (DONE) In the recently sold artworks page, we ONLY want to ...