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
21 views

Is it save to require plugin.php early to be able to use get_plugin_data() earlier?

I'd like to avoid hard coding my plugin's version at multiple places. To realize this the function get_plugin_data() comes in handy. But here the fun comes to an unpleasant stop. Checking for a plugin ...
0
votes
2answers
55 views

Rewriting URLs with a query string

I am running into a headache trying to get some url rewriting working on a wordpress website, running Centos 6 for operating system. This is what I am trying to achieve. Current URL = ...
0
votes
0answers
34 views

Getting $postid into a wordpress plugin

I am trying to modify a wordpress plugin which I am using for music requests, to create a new better plugin... https://wordpress.org/plugins/music-request-manager/ The plugin is activated by using a ...
2
votes
3answers
61 views

Change of query var in pre_get_posts not maintained

I'm creating a plugin that adds a custom feed. I am using a pre_get_posts filter to change the posts_per_page query var to -1 (to get all items of a custom post type). However, if I dump the $wp_query ...
0
votes
0answers
49 views

How to Mimic WP Custom Fields Ajax Methods

I have an admin metabox that allows the user to add multiple items. I am attempting to mimic the effect and styling that the default WP custom fields metabox gives users on posts/pages. I have the ...
1
vote
1answer
73 views

Why not to include reference to /wp-admin/admin.php in Plugin

Contact Form 7 recently pushed out an update which caused a few conflicts in other plugins. WPCF7 Author explains that it's because plugins are including calls to wp-admin/admin.php in their scripts ...
0
votes
0answers
40 views

How to add metaboxes in custom settings page of custom post type?

I would like to add meta boxes under a custom settings page, which is under a custom post type. I can create meta boxes for custom post types and I can create theme options, but can't find any way to ...
0
votes
1answer
23 views

Category select options for plugin settings

I am using Aqua page builder and I want to incorporate dropdown catagory select field for that. <?php $my_options = array ('one' => 'My Pony','two' => 'His Pony'); echo ...
0
votes
0answers
28 views

Restrict a query for custom field

I am using a plug in, which stores tickets as posts (Awesome Support Plugin) in the plugin classes, there is a function to restrict the tickets loading in the admin panel, basically to show tickets ...
0
votes
1answer
94 views

WP AJAX is not working, always returns 0

I've checked any threads here regarding this and did a debug test which worked, I'd like to understand why my own code doesn't work as it presents the same functionality explained in every possible ...
1
vote
1answer
26 views

Creating Admin Plugin - Content of a page is displayed at global scope as well

I've started creating a WP plugin which should work only in Admin Area. I've managed to create top-level menu with required sub-menu items, but when I try to print content of my page, it prints it ...
0
votes
1answer
23 views

Hook into install email

I created a plugin that makes use of the wp_install method (this part is necessary for the plugin to work properly and this function needs to be called). http://wpseek.com/function/wp_install/ ...
0
votes
2answers
47 views

Plugin Loading Scripts and Styles on Every Page - Even when not being used

I have a plugin that is using Class style programming. I'm completely stumped - scripts are being loaded on every single page, even if the plugin is not being used on that page. Since the plugin ...
0
votes
2answers
50 views

A function that will remove HTML <div> and </div> tags from a string?

I need a function that I can use that will remove <div> and </div> tags from a string. I have tried esc_attr(), and even wp_strip_all_tags() --- none of them work. They all leave the ...
0
votes
1answer
32 views

Plugin Development - Class Constructor Not Firing wp_enqueue_style action hook

Writing my first Wordpress plugin that uses a Class approach. It is being called on a page via a shortcode. In testing, the shortcode is working and the shortcode specific php file is being loaded. ...
0
votes
0answers
28 views

Show Parent category and Subcategory

I need to show sub category in below to the respective parent category in wordpress Sidebar. Without using plugin I need to show the parent category and its sub categories in sidebar with following ...
0
votes
0answers
26 views

Registration Form - Activation Email

Good Day Everyone, As some of you know, I'm building a new User Registration plugin. I am trying to create an Activation email with an Activation page for new users, but I cannot find anywhere on ...
0
votes
0answers
27 views

How can I map a specific URL pattern to a plugin for processing

I want to send traffic of a specific URL pattern to be processed by my plugin. Based on that pattern, I will pull some custom post type information from WP, gather external info via JSON, aggregate ...
0
votes
0answers
26 views

add image and url to plugin form

I want to create a plugin which contains a form with Fields: Image, Title, URL and Description of the Ad which the user is posting to my website. I have created a classified website and now I want to ...
0
votes
1answer
71 views

Shortcode display outside the div

I have created a shortcode that retrives and displays a form.The content of the attribute in HTML. function check_my_login( $atts) { return '<form action="" name="" method="post" ...
0
votes
0answers
35 views

how to create new posts , edit_post , delete post and get articals from other site by using JSON API plugin in wordpress.?

I am developing an application to publish articles in Wordpress via JSON API, I need to take a picture with send the create new_post,edit_post and delete_post how can I do this with json api plugin in ...
0
votes
1answer
22 views

Information on plugin adding text when a post, page, or other such is displayed

I need to know what API a plugin would need to use to add text or HTML to the beginning or end of a posts's text when the post is displayed. I have searched on Google - but none of the leads I find ...
1
vote
1answer
160 views

How do I resolve Notice: Undefined offset: 0 in /wp-includes/capabilities.php on line 1145

I've looked at previous examples of this problem but I can't find a solution for what is causing this notice based on what I've seen from other people. This appears at the top of the screen when I am ...
0
votes
1answer
12 views

Undefined notice on unset field

Still trying to figure my way around Wordpress plugin development, how can I resolve this undefined error? This appears when I add a new post, it can't find the post so I'm trying to figure out how to ...
0
votes
1answer
27 views

configuration of .htaccess for add_rewrite_rule to make sense

I am trying this code from codex wordpress site function custom_rewrite_basic() { add_rewrite_rule('^leaf/([0-9]+)/?', 'index.php?page_id=$matches[1]', 'top'); } add_action('init', ...
0
votes
1answer
22 views

Export Posts with specific custom fields by sql

My development site has posts with custom fields. Meanwhile my live site has more posts added while I'm working on my development site. Now I want to export posts with specific custom fields from live ...
0
votes
0answers
45 views

Using get_template_part() to modify single.php for a custom post type

I have a custom post type plugin called shows that has custom meta such as host, time, length, etc. I want to make it theme independent and require minimum coding for it to work across a lot of ...
2
votes
1answer
37 views

how to redirect to another post without getting headers already sent error?

Normally the code below works for my purpose. I need to check if a post is in a certain category, check against user role and only allow user to see the page if the roles match function ...
0
votes
0answers
51 views

Calculate with custom checkout field in Woocommerce

I'd like to calculate the shipping fee based on a custom created checkout field. I'm using the update_totals_on_change class to recalculate the shipping fee when change this value. // Action to ...
0
votes
2answers
132 views

Registration form Plugin… Email confirmation

Good Day Everyone, I am trying my New User Registration form Plugin on a live site, but the emails are not being sent. I save the new user using: if (empty($errors)) { $myplugin_newuser ...
0
votes
1answer
29 views

Plugin working on my local installation but Cannot be activated online

Good Day Everyone, I want to test my Plugin online on my real website but I don't know why, the following line would give an error, when on my local installation everything works perfectly. (I tried ...
0
votes
1answer
34 views

zip unzip attachments in wordpress

my client using easy digital download plugin for sell their photos. They upload a zip file that contain many photos and sell this zip file. My need is to extract this zip file and display the images ...
0
votes
1answer
34 views

Issue on Getting Images URL of the Post Gallery

I am trying to get the URL of the attached galley into the post on custom page layout called Gallery Page. I tried to use the code from Codex at This Page (get post gallery images). but I am not ...
0
votes
0answers
10 views

How can I add page-level settings to a widget?

I've authored a widget that has settings on the widget page, and works correctly. I would like to add the ability to set an override for the widget's settings on a specific page or post. I'm imagining ...
0
votes
0answers
28 views

add_settings_field() inside loop

Hey I'm trying to add textareas dynamically - so there's no fixed amount of textareas which are added. I tried it with anonymous functions inside a loop, but I just can't get it to work. Here's my ...
0
votes
0answers
40 views

Generating a URL with no content for captcha

I modified my regular form to ajax form. I have captcha simple_php_captcha in my form which is generating captcha. I need to chage it's image if the user request it to change. I am thinking to ...
0
votes
1answer
119 views

ajaxurl not defined on front end

I am trying to create a ajaxform on the front side. I am using the code jQuery.ajax( { type: "post", dataType: "json", url: ajaxurl, data: ...
0
votes
0answers
44 views

Set Class Static Variables Before init

I want user to set three static vars before init then call register_post_type using these variables. The issue is the static variables passed empty from prepeare_post function .. I don't know what ...
0
votes
1answer
44 views

Can I access Wordpress API's from within plugin scripts?

I'm developing a WP plugin. In my plugin I have a file that processes form data. For example, user will enter shortcode: [poll-form] And it will output a form with the action attribute set to the ...
0
votes
0answers
22 views

Displaying multiple custom post types in single post type at admin section

I want to display different custom posts types in single post in admin section. how i can accomplish this. I have 3 posts which are Events, Members and Guests. I want to display these 3 posts like ...
0
votes
0answers
22 views

Plugin development - show saved shortcodes in admin panel/page

I created a shortcode plugin and now I am creating an admin page for the plugin. What I would like to do is that, when you hit the submit button in the admin page after choosing all the attributes to ...
0
votes
0answers
23 views

Theming Custom Plugin Page

I am creating a plugin that collects user information. It's a bunch of forms. So, the user will hit the first form page, enter data, then be redirected to the second form page, where they enter more ...
1
vote
0answers
42 views

Adding a metabox on a CPT's submenu page

I have a custom post type registered and a submenu page for some admin actions for the CPT. This page has some items listed in a WP table. I want to add a meta box just below those items. This is ...
0
votes
1answer
63 views

allow user to select pages from dropdown in my plugin

I have a plugin and a part in it allows user to select the page plugin works on by specifying the id of the page. But I want that he should be able to select the page from the pages available in the ...
7
votes
2answers
197 views

Is it mandatory to use $wpdb->prefix in custom tables

Sorry if this question is trivial. I'm just beginning to develop plugins in WordPress. In all the tutorials I found this: while creating the custom tables, $wpdb->prefix is used. Example: ...
0
votes
0answers
25 views

Wp_parse_args not taking the value set from $default

I am learning about creating widgets and am a bit confused on wp_parse_args as it's supposed to merge together an array of arguments per the codex definition. I have $defaults set specifically with a ...
0
votes
1answer
38 views

Wordpress ajax not working in registration

guys. I've tried to build a wordpress simple registration form with ajax, but it doesn't work at all. Here is my code, a php and jQuery ajax. Please tell me what's wrong with my code. FYI, (1) the ...
1
vote
1answer
33 views

Add media and attach images to pages

I have this problem with attaching images and add media. ADD MEDIA Go to page Click on "Add media" Insert an image Image shows in editor, but when I go to the page and do the below code it doesn't ...
0
votes
0answers
10 views

alter $post variable in main query as soon as possible [duplicate]

I'm using WP with WooCommerce. For some purpose, I want to load a predefined static page (e.g. with id=5) whenever the user enters a product page (e.g. www.mysite.com/?product=my-product), by ...
0
votes
1answer
39 views

Custom plugin to get related posts by category

I'm learning how to create custom plugins for Wordpress, I am trying to get related posts by category. The problem is, I am returning all posts regardless of it's category whether it's the same ...