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)

2
votes
2answers
44 views

How often do you need to register_post_type?

Assuming you write a plugin and hook into activation / deactivation to register_post_type is that good enough? Or do you need to do it every init? I'm looking for perf boosts and I want to reduce ...
0
votes
1answer
115 views

How to call external functions from a PHP script in a WordPress plugin?

I'm a WordPress beginner, and I have tried to develop plugins, but I don't know how to call external functions in a WordPress plugin. For example, I have an external PHP script called download.php in ...
4
votes
1answer
292 views

Turn Shortcode Gallery into Carousel in WordPress 4.4

I searched for existing plugins that could do carousels in wordpress posts but they turned out to not display correctly in WordPress 4.4 which released recently. ...
0
votes
1answer
43 views

How to replace default comments with custom HTML?

I'm going to replace default list of comments and comment form with Facebook's comment box. As far as I know there is function wp_list_comments(). How can I replace this function with my custom one? ...
0
votes
0answers
133 views

Custom Message with Order status from WooCommerce Payment Gateway Callback to Order Thank You Page

I would like to pass on the custom message to order-received page in woocommerce. Here how i currently handle the callback from payment gateway if ( isset( $_REQUEST[ 'callback' ] ) { ...
0
votes
1answer
35 views

Should all roles be allowed CRUD operation on the database?

Is there any limitation that any specific role out of (Admin/Subscriber/Editor/Contributor etc) can perform CRUD operations on database. In my WordPress website, all users are subscribers and they are ...
2
votes
1answer
159 views

Add CSS animation as Preloader to WordPress

I found a CSS animation snippet on Codepen, and would like to add it in my WordPress site for preloader animation, but I couldn't find any related help or plugin that would allow me to add a Preloader ...
0
votes
0answers
22 views

Simple renaming my custom post type set with a plugin doesn't work?

I have created a plugin which activates a custom post type and it all works, but now i wanted to rename the custom post type, say "future-visitors" in stead of "past-visitors". But when i just ...
2
votes
3answers
199 views

Remove profile picture option (and other things) from profile.php (in admin)

Just upgraded to WordPress 4.4 and I notice now my users' profile page in admin, there's a section called "profile picture", with a link to Gravatar. The plugin I'm developing restricts a lot of ...
0
votes
0answers
19 views

Add custom post name only with page URL

The problem I have is that the "travel destinations" are pages and the "accommodations" for each destination are custom posts, therefore the permalinks break. My destinations here: ...
0
votes
1answer
27 views

Associating special meaning with user id 0

I'm writing a plugin that creates a custom table holding data which is linked to a user account with a user_id field. Now if that users account would be deleted for any reason I would like to set that ...
0
votes
1answer
20 views

How to use a WP_Customize_Control outside of the Customizer?

I have a few custom WP_Customize_Control classes that are shown within the standard WordPress Customizer area. These are working fine. Is it possible to pull some of these out of the customizer and ...
0
votes
1answer
18 views

Why is the form not updating when I select a new sector from the list?

Im trying to fix a form on http://s195004125.websitehome.co.uk/jobs/ for some reason the sector selection box doesnt update the list below when a change ios made but it changes when you select a ...
0
votes
1answer
44 views

Javascript in plugin not working

I'm working on a plugin that relies on several JS scripts. In my plugin file (graph-plugin.php) I've the following function: function initialize_scripts() { wp_register_script( 'int-flot', ...
0
votes
0answers
23 views

Creating the Custom post type inside plugin page?

Is it possible to create the custom post type inside the plugin page same as it appears individually with all of its filters and action button on the plugin page?
4
votes
2answers
51 views

Turn revisions off in plugin instead of config.php?

Is there a function to set WP_POST_REVISIONS from a plugin instead of having to do it in config.php? I was thinking of doing this: runkit_constant_redefine( 'WP_POST_REVISIONS', 0 ); but that puts ...
-1
votes
1answer
43 views

What is the source outline for a basic word press plugin?

I'm a fairly skilled PHP developer, and watching a tutorial on how to build a WP plugin, with the intention to get my name out there. What is the outline for a WP plugin that includes database calls? ...
0
votes
0answers
11 views

Multiple page plugin settings

I am building a plugin and I have made a single setting page that is working without any issue. Since it is becoming very long, and that it is made of 3 distinct sections, I wanted to split it in 3 ...
0
votes
1answer
84 views

Adding a brand column to WooCommerce Products

I'm going to attempt to add a brand column to the WooCommerce Products admin table, and also update the search filter so it searches for brands also. Has anybody done this before though? I've never ...
0
votes
0answers
24 views

Showing category not added after adding category

I am submitting "add category form" by triggering submit event on form with jQuery. It adds category but still show "Category not added error". $("#submit").on("click", function(){ ...
0
votes
1answer
25 views

Filter get_user_by instead of replace function

I have developed a plugin (despite minor understanding) that replaces pluggable function get_user_by to pull userdata from another source. While this works, it can lead to maintenance whenever there ...
0
votes
1answer
11 views

Theme editor removes backslashes

I'm having issues with backslashes being when saving changes to files in the Wordpress theme editor (theme-editor.php). So for example, Appearance > Editor > style.css I'm fairly certain that ...
0
votes
0answers
17 views

Submitting data to options.php from category admin page

I have created a new image field in Category taxonomy page which selects image using WordPress media up loader. Now I want to save the path of image and category name in wp_options table. I have ...
0
votes
0answers
42 views

Rewrite Rules: Post ID within Post Slug for a Custom Post Type

I've got my custom post type slug article and I need the following permalink structure: http://domain.com/article/postname-123/ The number in the end has to be the post ID. I don't want ...
0
votes
0answers
16 views

WordPress plugin admin html being shown in Customizer iframe

I have a WordPress plugin that is focused soley on the admin side of things. I have a peice of HTML that is shown on all admin pages using the all_admin_notices hook. This worked very well but I ...
1
vote
1answer
137 views

How to change post status from publish to draft using hook in wordpress?

I want to change the status of already publish post to draft using its id. add_action( 'save_post', 'change_post_status', 1 ); function change_post_status( $post_id ){ $my_post = array( ...
0
votes
1answer
36 views

Can the wp_posts table have the same slug (post_name) in multiple statuses (post_status)?

I'm using function get_posts to retrieve a set of post objects that are my custom post type (CPT). I am counting on being able to programmatically flip these posts between status "publish", "pending" ...
0
votes
0answers
27 views

How can I use get id with wp job manger category search?

Im trying to make a form that goes from the home page where you can fill out location and job sector from a drop down list and then its sends the values to the jobs page and search the jobs with the ...
3
votes
1answer
20 views

Custom theme sufficient or custom plugin neccessary for this feature set?

I plan some sort of an event website. There are organisations, which can host zero, one or multiple events. Events are never published on their own. Events will be published as 'inline' snippets only, ...
1
vote
0answers
37 views

Convert checkbox to dropdown [closed]

I'm using WP Job Manager, and I want to convert the Job type checkbox into dropdown. How to do this? Thanks Here's the link: http://bit.ly/1OEzAwz
2
votes
1answer
167 views

Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]

What I eventually want to do is when user logged-in to the site, I want to redirect the to the page with all the post created by that user and I want to load them via AJAX request. I have save ...
0
votes
0answers
23 views

Remove spaces if entered in “site name” on Multisite reg form

I used this with the Paid Membership Pro plugin on Multisite. https://github.com/strangerstudios/pmpro-network Its a few years old but tried and it works with one slight issue. When someone enters ...
0
votes
1answer
105 views

I can't fetch query parameters ($_GET parameters) with get_query_var

I am developing pagination for a list of posts in my plugin. I've added a custom parameter in my plugin_functions.php file: add_query_arg('pworkspage', 1); As you can see it defaults to "1". Now, ...
0
votes
1answer
26 views

WordPress Plugin Development- When our plugin functions call?

Assume that I have created plugin to include custom post type called site and plugin to search result. Assume I have added only following code to my plugin. function searchAll( $query ) { if ( ...
0
votes
0answers
48 views

Setting API - Default values for options when active the plugin

I have registered two options called test33_header_logo and test33_advertising_code. I need to set default options(test33_header_logo="logo1",test33_advertising_code=123456" when activate the ...
0
votes
1answer
50 views

Action Links in Class located in Subdirectory of Plugin

A class for action links in a plugin loads properly if the class is placed inside the main plugin.php file. If the class is moved to a separate file located in a subdirectory of the plugin then the ...
0
votes
1answer
90 views

How to add Request header in WordPress remote api calls

Hey am new to WP development, can any one tell me how to add request headers in wp_remote_get() or wp_remote_post() remote api calls. I tried the following but didnt work $response = ...
-1
votes
2answers
27 views

The plugin generated 3265 characters of unexpected output

I am trying to built fancybox plugins.I added all js and css file to my php file and add one image to it ,but I found this error. The plugins generated 3265 characters of unexpected output during ...
6
votes
1answer
164 views

Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?

I am writing a plugin that instantiates a custom post type (among other things). It is a multisite plugin and lives in the directory mu-plugins. What is the best practice for handling ...
0
votes
0answers
19 views

Should I make a plugin or modify the default theme? [duplicate]

My project is this: to modify an existing plugin to add payment functionality that is not currently available for download as a separate plugin. So I need to code it all myself. I've begun this ...
0
votes
1answer
22 views

Odd map_meta_cap $args on post edit — sometimes integer, sometimes string

I've been digging into the map_meta_cap filter since I need to extend the user's capabilities based on context, in certain situations. This is working well but in my traces I noticed something odd ...
0
votes
1answer
33 views

what is -> -> means in wordpress

I'm bit confusing what is the meaning of this line. $show_title = Ninja_Forms()->form( $form_id )->get_setting( 'show_title' ); "-> ->" available in PHP or it used only within wordpress.
0
votes
1answer
91 views

Display custom post type archive on page.php template

I want to display the custom post type archive of my plugin inside a normal page template. My approach was: function my_include_template($template) { global $post; if ( ...
0
votes
1answer
16 views

Exclude specifed files from plugin editor

I just wonder is any chance to exclude custom plugin files from Wordpress plugin editor. I don't want give access to couple files from my plugin form wp-admin users. I try to use tips from link ...
0
votes
0answers
12 views

How to validate user subscription with paypal?

I have created a custom role for my wp site, i also created a custom user register form for this role, i want to charge an amount before the user can finally subscribe. Is this possible, i'm doing ...
0
votes
2answers
23 views

Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)

Here's a very simple plugin, which I drop into mu_plugins in my multisite installation: <?php /* Plugin Name: Test */ class myclass { function __construct() { error_log("I just ...
14
votes
3answers
2k views

How many times will this code run? (or, how rich is grandma?)

Hypothetical example but real world applicability (for someone learning, like me). Given this code: <?php function send_money_to_grandma() { internetofThings("send grandma","$1"); } ...
0
votes
2answers
53 views

How to change a field in database through a submit button or Checkbox? [closed]

I'm trying to create a plugin for wordpress where the form stores data in a database. I'm trying to make a submit button to update the status (field) of one row from 0 to 1 but its updating all the ...
1
vote
3answers
58 views

Trying to understand order and frequency of action hooks firing

I'm working on a plugin that modifies user capabilities and turns off a lot of things in the Admin pages. I'm having some problems with order of execution with my code, so I want to refactor it and ...
0
votes
3answers
36 views

Sending Parameter Failed

This is so basic, but i couldn't understand why it's not working, i'm trying to send parameter from add_action(), this is my code in my function.php: function testingID( $testParam) { ...