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)

0
votes
1answer
17 views

Enqueue scripts in footer

I'm trying to build a plugin and enqueue my scripts to footer. For performance reasons I'd like to load this plugin scripts after the functions.php scripts, because furthermore it will break the page ...
3
votes
2answers
70 views

Unable to write test cases for a WordPress plugin using PHPUnit and WP-CLI

WordPress setup: Installed WordPress using VVV. PHPUnit setup: I have setup the testing suite as mentioned in Pippin's blog. And accessing PHPUnit after logging into the box machine by using vagrant ...
3
votes
2answers
3k views

get_template_part from plugin

This is default get_template_part function inside WordPress: function get_template_part( $slug, $name = null ) { do_action( "get_template_part_{$slug}", $slug, $name ); $templates = array(); ...
1
vote
1answer
690 views

How to get Login Error messages on a custom template

I want to display login form and process the login on the same page, so that if there is any login error it should display the error messages on the same page. I have added this function: add_filter(...
0
votes
0answers
27 views

Gzip compression not working [migrated]

I have enabled mod_rewrite, mod_deflate, mod_headers and mod_setenvif in Apache and not mod_gzip, mod_filter. Tried <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and ...
0
votes
1answer
20 views

How to change the wording of front-end `next article` for custom type registered in a plug-in?

I am working with another developer on a plugin that register and defines a custom type of posts. It's working as intended in the back-end but I would like to change the wording of next article and ...
0
votes
1answer
445 views

WP Dropdown Categories, display subcategories but not grandchildren categories?

So my main goal is to create 3 drop-down category options to run a search. It's for a car website, so I have 3 parents, "Make", "Model", and "Year" At the moment I have the following code <?php $...
0
votes
2answers
59 views

How to get all product in the woo-commerce?

I want to get all the product data in the WooCommerce (sku, name, price, stock count, availability and etc.). Can I do that using WP_Query?
2
votes
0answers
27 views

How to create thumbnail of different files?

I am storing my uploads in a separate folder and using separate table to save the location in database. I have gone through WP_Image_Editor , wp_image_editor_gd and wp_image_editor_imagick . I also ...
0
votes
0answers
20 views

Wordpress calls my plugin while trying to update Wordpress Core

I am developing my plugin right now, and I have faced with one issue. I tried to update my Wordpress core to the latest version but it shows me an error in my plugin. I think I doing something wrong. ...
15
votes
4answers
28k views

How to add a javascript snippet to the footer that requires jQuery

I know I can add a script file to the footer of wordpress that requires jquery using this code: <?php function my_scripts_method() { // register your script location, dependencies and version ...
0
votes
1answer
53 views

Ajax not working to insert, query and result data

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with ...
0
votes
0answers
42 views

wp_mail and mail function not working when mail server is ok

i'm working on plugin with porpose : Get information from user and then send file url to user's email i used ajax and everything is ok without send mail i test my wordpress site for send email with ...
-1
votes
0answers
21 views

Plugin “Remove Slug From Custom Post Type” gives 404 Errors

This plugin did all I wanted, but it started giving me 404 errors, which go away after a while but I'm worried they'll come back. I do get this error while posting a new listing (real estate theme) ...
6
votes
17answers
427 views

The Great Plugin Nomenclature Contest of 2011

It's been a while since I've done a bounty challenge, so here's another. Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will ...
0
votes
0answers
17 views

Ajax interfering with widget back end Javascript

I have a plugin that creates a widget that allows users to click a button and select an image. I have noticed that immediately after the widget is dragged and placed into a widget area, two Ajax ...
0
votes
1answer
16 views

Custom post type in Custom widget - $listItem

Hi i have a slight problem when making a custom post type widget. the problem is that when i add a custom field in the code the part that shows the custom field information get's on top of the output ...
0
votes
1answer
17 views

ACF in wordpress

Hi i have a slight problem when making a custom post type widget. The problem is that when i want to get the field i want to use in a inline style it doesn't work. This is my code: class ...
10
votes
4answers
7k views

What's the difference between term_id and term_taxonomy_id

The title says it all. At the moment in my custom taxonomies I'm getting the terms using the term id and taxonomy name. Thought this question would've been asked before but can't find it anywhere! So ...
6
votes
3answers
2k views

Query Posts by Custom Field 'Price'

I'd like to display all posts within a given price range. For example: When a user inputs 100 and 1000 (in two separate form fields) - my site will display all posts that have a custom field called ...
3
votes
2answers
1k views

Display only certain posts based on visitor's country?

Is it theoretically possible to have the following feature? Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, ...
0
votes
1answer
27 views

Get (eventual) permalink from post within Edit Post in Admin panel

I'm working on a plugin that needs to access grab the Permalink from within the Edit Post screen to send it to a link-shortener API. The catch is that I will need to grab the permalink before the post ...
0
votes
0answers
20 views

wp_signon not working on website but it works on localhost

wp_signon() is not working on my online website, though it works on localhost. I am making a custom login for my website, and can't understand how to solve this problem. When I log in on localhost (...
0
votes
1answer
16 views

Add post type pages with plugin

Can I add the archive and single page for a custom post type added by my plugin? I know it will only have to be a best guess with contents like: <?php get_header(); ?> <h2><?php _e('...
0
votes
0answers
36 views

Custom Meta Box Image Gallery Not Saving

I'm having an issue of a custom meta box I'm building based off of WooCommerce's Product Gallery meta box. The meta box is not saving for some reason. I've tried some options from many different ...
1
vote
0answers
20 views

Correct way check nonce (security) using old Options API

I am developing plugin for Wordpress. Firstly I started using Settings API it looks good, but it is little bit complex and it doesn't provide the way to handle options manually. I have quite ...
0
votes
1answer
20 views

What is the replacement for rich_edit_exists()?

A plugin inserts users into a database. If the user is an author, the visual editor isn't showing until the user saves their profile. I'm trying to figure out what setting isn't being added to the ...
0
votes
1answer
24 views

Issues separating my Plugin pages into different files

As my last (first) plugin got a bit hard to manage with 6 admin pages in 1 file, I decided to split them up for this one, but I am getting nothing but issues doing so. In my plugins functions file (...
10
votes
6answers
3k views

How can I add an option to the Page Template list from a Plugin?

I've been looking around for the past couple hours for a way to create a custom page template from within a plugin but haven't had any luck yet. What I am specifically trying to do is add an option ...
0
votes
1answer
55 views

Widget Script Loads at Bottom of Page

I've been working on a plugin that adds a script to the sidebar when activated. So far, I've been able to display the code, but it loads at the bottom of the page and not in the sidebar. I'm pretty ...
0
votes
0answers
68 views

Filter the_content() to add custom figure tags

I'm trying to implement responsive images on my site, and have all the required component parts working, and understand the concepts, but need some help putting them together; Knowing that WordPress ...
0
votes
2answers
33 views

My stylesheets are not enqueuing

I'm in Wordpress 4.5.2 on Windows 10 and I'm trying to register and enqueue my stylesheet in Wordpress, but it just isn't working. I'm having the same problem with jQuery. I have this code in a ...
4
votes
2answers
66 views

Unit testing to simulate the loop

How do you construct unit tests with PHPUnit and the WordPress test framework that simulate being in the loop? For instance, if I want to test a function that is only able to be called in the loop ...
1
vote
0answers
29 views

Difference between wp_salt schemes

I am running a wordpress user system with 15k users/day. I have a custom message system and there is an issue in it. Sometimes (like at 1/1000 users) wp_hash that generates security nonce returns ...
1
vote
1answer
67 views

Including comments meta box on a plugin page

I want to include the 'Comments' meta box (the one usually seen on the post creation page) on my plugin's admin page. Is there a way to do that? I am aware of how you can use add_meta_box() to add a ...
0
votes
0answers
61 views

Error extending widget class defined in another plugin

I am trying to extend a widget class from another (widget) class in a 3rd party plugin - so hierarchy like this: 3rd_Party_Widget extends WP_Widget (in 3rd party plugin) My_Widget extends ...
0
votes
1answer
20 views
48
votes
6answers
10k views

Where to put my code: plugin or functions.php?

Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
2
votes
2answers
923 views

How to Use WordPress Color Picker API in Custom Post Type Metabox

I have a Custom Post Type called "Banner" which has a custom Meta box with two advanced fields "Title" (text Field) and "Color" (color Picker). Can you please let me know how to use the WP Color ...
0
votes
1answer
18 views

how to add a comment button to be displayed only for the posts in the home page [closed]

I need a button which directs to the comments section of that particular post. I want that button to be displayed only in the home page for every post. Can anyone help me with this My website url is ...
2
votes
3answers
4k views

Custom height/width for thickbox in WP Backend

I use thickbox in the WP backend for preview or other content. On own pages in the backend works my script very fine and a can use custom width and height for the thickbox. below my code: ...
1
vote
1answer
27 views

How to use a hook to override an update_post_meta call in a plugin?

A plugin I'm using contains the following code: $download = array( 'post_title' => $title, 'post_content' => '', 'post_status' => 'publish', '...
1
vote
1answer
748 views

How do I alter the position of a Custom Post Type menu item within my plugin admin menu?

I'm writing a plugin (for the first time, so bear with me!) which includes a custom post type; 'Programmes'. In the admin menu, I've set up a new menu group for the plugin, and I have the 'Programmes' ...
0
votes
0answers
32 views

How to change the capabilities from upper case to lower case, while inserting onto database?

I am trying to insert custom user roles like Student, Teacher and Parent. While inserting the capabilities into the database, it is displaying the role in uppercase. I am not able to fetch the user ...
6
votes
3answers
213 views

Where to store plugin settings fields

I am developing plugin right now, and I have one questions about best practices and conventions. What I need ? My plugin is going to store some predefined object, list of objects (or just ...
0
votes
1answer
40 views

Set a Custom Post Type as a Homepage

Im trying to set up a custom post type single post as a homepage. I have custom plugin, it registers CPT called STACKS, Im using it to build various one page scrolling pages... It has its own custom ...
0
votes
1answer
270 views

Custom Post Type template for homepage

I'm writing a squeeze page plugin and I've hit a bump. The plugin needs to be able to display custom post types with a custom template and also be able to be used for the homepage. So I've got the ...
0
votes
0answers
32 views

I can't add data from wordpress admin to database

I want to add some text from a textbox in admin to database. I've crated a table in database and now I want to check nonce and if everything was right, submit data to database. I've used this code ...
4
votes
4answers
4k views

Empty POST data on server on AJAX request using Angular $http

I use AngularJS to build an AJAX form which is then processed on a server running Wordpress. Server-side handler is simple: function rnr_contact_callback() { $name = $_POST['firstName'] . ' ' . $...
0
votes
0answers
34 views

How should I share my plugin error with the end user (frontend)

Let's start by saying that I'm a total wordpress noob, I've googled and searched a little on Stack Overflow and I can't seem to find the information I'm looking for; a big part of that is I'm not ...