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
0answers
18 views

New Wordpress plugin - authentication is needed

I write a new plugin that will work against an external application. This application need an access to this plugin, and will create, edit and delete posts. Of course I want to protect the plugin so ...
2
votes
1answer
1k 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(); ...
0
votes
1answer
584 views

Uploaded image not appearing in custom post type

I am writing a plugin which should allow users to create a custom post type called reseller and attach an image. The image is being uploaded to the uploads folder and appears in the media library with ...
1
vote
1answer
20 views

Editor access to plugin settings

I'm trying to give access to an user with the role Editor to this plugin settings page: https://wordpress.org/plugins/commenter-data/ In the code of this plugin on line 31 of commenter.php there is ...
1
vote
5answers
2k views

WP_Query returns no results

I'm using wp_query to create a custom query that retrieves search results but it is returning 0 results. Here is the code: $query = 's=the&posts_per_page=5&paged=1'; $custom_query = new ...
1
vote
1answer
51 views

Plugin development, hooks, generate content

I'm building my first plugin. This plugin will activate a theme, set up a default front page, register tax. / cpt, and create some content. (cpt = custom post types) I made it work all this in ...
1
vote
1answer
2k views

How to create database table, add data, update and delete using wpdb via plugins?

I am just starting out to create plugins with database. I know to create a custom database when activating the plugin. I just want to know whether we can create tables at the front end like adding the ...
0
votes
1answer
389 views

wp_insert_user keeps echoing values

This is bugging the heck out of me. Essentially I've narrowed the issue down to one line of code: $user_id = wp_insert_user ($userdata); From what I can tell nothing should be echoed here, but I ...
0
votes
1answer
1k views

How to change post status in hook?

I have similar problem as described in How to trap "Publish" button to check for meta box validation? Answer there is to hook into save_post and change post type. How can I do it? I try to ...
0
votes
1answer
24 views

How to translate wordpress backend to another language

Is there any way to translate wordpress entire backend to another language that is not supported yet. ? I mean, my language is Sinhala (Sri Lanka) and sinhala is not yet included by default on ...
0
votes
0answers
6 views

Custom table loop with pagination link issue

I have a custom table in WordPress and trying to listing records with Pagination. With below code, I able to create pagination but only problem is when I click on page 2 than all links will stay on ...
0
votes
1answer
274 views

Why is contact form not working?

I am using a custom contact form plugin from code.tutsplus but it is not working. It looks as if the form is sent because I get the confirmation badge, although I receive no email (I have tried ...
0
votes
1answer
24 views

Can't switch theme after activation

I'm creating a plugin (I'm very newbie in this) to load custom taxonomies, custom post types and an automatic activation of a theme, so I have this code: // Custom Post Types and Taxonomies ...
1
vote
1answer
27 views

wp_scheduled_event being removed mysteriously

I have a plugin that sets a scheduled event and runs fine for myself and all users except one. On his server the scheduled event is mysteriously removed somehow after working fine for hours/days. I ...
1
vote
1answer
25 views

Force HTTPS 301 redirect with hook

I am trying to force a 301 https redirect with hooking into the 'template redirect' function. I want not doing it a htaccess because when I update my permalinks, htaccess with https redirect ...
2
votes
4answers
1k views

How to restrict plugin's sub-menu pages to admin/subscribers?

I am working on a plugin with 6 submenu pages. I want 5 of them to be accessible by Administrators only and 1 of them to be accessible by Subscribers only. Both user roles will have different ...
0
votes
0answers
14 views

Global Signup/Login in two wordpress site some like similar to stackoverflow?

I have two different wordpress installation at two different server one at mydomain.com and other at subdomain.mydomain.com having different database. My question is how I implement global ...
5
votes
3answers
764 views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
0
votes
1answer
621 views

Create an user on external database

I have wordpress site and a project management system from codecanyon. Here is the link I have disabled registration for users in project managment system, only login is enabled. I need to make users ...
5
votes
1answer
353 views

Adding more options to the instance of an image. (Attachment Display Settings)

I'm trying to build a simple reusable plugin for image presentation in Wordpress 3.9, and it seems I've hit a brick wall. I would like to be able to add a couple of options to the instance of the ...
0
votes
1answer
23 views

Error when trying to save custom post type settings (ERROR: options page not found)

I know this is a common error but I haven't come across any solutions that have worked. I'm creating a plugin that uses custom post types and I have a settings page under that CPT's menu. The settings ...
0
votes
1answer
8 views

Generate custom RSS from a plugin

Using this tutorial I was able to create basic custom RSS feed. but I'd like to have a custom RSS generated from a plugin, and my Google-Fu failed me on that specific search. Is there any way to ...
0
votes
0answers
12 views

Is it good practice to use WordPress nonce values to restrict page access?

I'm working with a colleague on a WordPress plugin. Part of the plugin functionality is showing dynamic lists with links which allow you to open a new page. Depending on the user's role, they may or ...
0
votes
0answers
6 views

Custom table in my plugin print UTF-8 (מוברש) charsets and not hebrew

i have created custom table in wordpress db to use my plugins needs. i have campaigns with hebrew names, this saved to column (varchar(100) utf8_unicode_ci ) in the DB i dont see hebrew but this: ...
0
votes
2answers
2k views

How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.
4
votes
1answer
27 views

Get specific color from admin color scheme

I know how to print the current color scheme by using: echo get_user_option( 'admin_color', get_current_user_id() ); or echo get_user_meta(get_current_user_id(), 'admin_color', true); but I need ...
0
votes
2answers
413 views

Creating a Link Text like Submit Button in Admin Page

I'm making an admin page for my plugin and I'd like to make a text link designed like the form button of admin pages. I tried this but didn't work well. <a href="" cless="button-primary" ...
0
votes
2answers
399 views

AJAX request not routing through proxy

I've built a plugin that uses AJAX to post a URL to the URL2PNG API and bring back a screenshot into WordPress via wp_remote_get. It works beautifully in my development environment. In production, ...
0
votes
0answers
15 views

Custom Post type url with category

i created a custom post type for my plugin. They can be categorized but the effect of that is kinda limited. Lets say we have the post type magazinesand the categories print and digital. I now create ...
4
votes
1answer
631 views

Creating a user's own folder on user registration

I need a plugin or some guidence on creating a user's own folder on user registation. For example...A user clicks on Register and registers ... I need wordpress to create a directory which would be ...
1
vote
1answer
547 views

save_post hook not triggered in WP v3.6.1

I developed a plugin having a custom metabox that is using the save_post hook to store data. The plugin is 18 months old and is used by thousands of customers, so I'm pretty sure everything is good. ...
0
votes
0answers
16 views

Displaying Custom Sidebar Without Modifying Theme's Core File?

Is there a way to display custom sidebar created with a plugin on the wordpress front-end without modifying theme's core file? EDIT: Here is what I currently doing: I hooked the custom dynamic ...
-1
votes
3answers
314 views

Insert Array in Plugin Database

trying to create one plugin, getting some issue to submit the array data in wordpress database. $formDATA gets the array value now issue is when $sql = "INSERT INTO `".$table_name ."` ...
0
votes
1answer
716 views

using wp_footer hook in a plugin

I'm using the wp_footer hook into the plugin and it doesn't work, but when I copy the code to the "functions.php" file of the active theme it does work, what is the possible problem in this situation ...
0
votes
0answers
57 views

Simple WP Plugin with plugin settings page

I need to create a plugin with only one select on his settings page and save select value. I have a select with all register menus and I can not to save my select value. What am I doing wrong? What ...
0
votes
1answer
20 views

Certain functions are undefined when called form mu-plugins

I have a correctly formatted php functions file in my mu-plugins/ directory. When trying to use wp_is_mobile() or current_user_can(), I get an undefined function error. Fatal error: Call to undefined ...
1
vote
1answer
21 views

Any hook for pre-plugin-update -either bulk or single plugin update

Any hook is available on before the plugin update action ? i searched in hooks library . What is the exact hook? . Doing some stuff before updating plugin/theme .
3
votes
1answer
999 views

How do you create a custom edit.php / edit pages page

I need to create 3 custom edit.php pages which only display pages with a certain parent and the Post New button links to a new page with the corresponding parent. The closest answer I can is do not ...
6
votes
2answers
14k views

How to get the path to the current theme?

This code is used to get the directory of the current plugin: plugin_dir_url( __FILE__ ). What should I use to get the directory of the current theme?
2
votes
2answers
406 views

Multiple files in wordpress plugin

I'm trying to write a plugin with multi files. I'm sure I did it before without a problem, but now I have the problem in the subject. In the main plugin file I have included a file name - ...
2
votes
1answer
95 views

Wordpress Media mime type filter problem 4.0

I have added new mime types with the 'post_mime_types' filter eg. PDF, doc, mp3 etc... Filtering by custom mime type on the upload.php page in media grid view works as expected but in list view it ...
0
votes
1answer
416 views

wp_schedule_event in a class

This is my (stripped down) plugin, in OOP: <?php /* Plugin Name: Cron Test Plugin URI: http://www.mywebsite.com/ Description: Test Version: 1.0 Requires at least: 3.0 */ class CronTest { public ...
0
votes
1answer
258 views

How To Create A File Archive in WordPress?

I've installed WordPress for my schools website. I need create a file archive, an uploader and a file viewer for the website. The file archive would store files on the server. The uploader would ...
5
votes
1answer
764 views

Show Similar Post Titles ( Similar to Stack Exchange )

I really like how Stack Exchange sites handle posts, where after you finish typing the title it will list out similar titles. How can I implement something similar on my WordPress installation? The ...
4
votes
3answers
2k views

Add Dividers or Separators Between Nav Menu Items

Does anybody have an idea on how to allow a user to drop in separators or dividers between certain nav menu items? Google only seems to bring up rookie CSS tips for first/last child selectors but I ...
1
vote
1answer
32 views

Namespaced action and filter tags

I'm upgrading several of my plugins to use PHP namespaces, so that functions, classes, constants etc are all namespaced correctly. <?php namespace my\plugin; function init() { ... } // ...
4
votes
2answers
839 views

Edit or Remove Plugin .htaccess Using The Admin Panel

I am looking for a way to edit or reset the .htaccess file for a wordpress site without access to the filesystem, working only with the wp-admin web interface and/or plugins* (see below for the back ...
0
votes
1answer
40 views

WP_Editor - Saving Value into Plugin Option - Stripping HTML

I have a wp_editor(); on my plugin settings page. I also have enabled the "Font Size" drop down in TinyMCE. After highlighting text in the wp_editor(); and selecting a font size from the editor's ...
2
votes
3answers
671 views

Getting Details Of Uploaded Image

I'm using Wordpress' upload system (as explained here) on my plugin's admin page. I can upload an image and get this image's URL. But i need attachment ID, image caption etc. How can i reach them? I ...
1
vote
1answer
547 views

Plugin admin page meta_box toggle and order state not saving

I can't get the toggle state and open/close status of meta_boxes on my plugin admin page to be stored. The ajax response is always 0 I'm using meta boxes to hold sections of menu for a plugin. ...