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
3
votes
2answers
971 views
How to implement bulk actions in my plugin?
I am developing a WordPress plugin.
This plugin displays a list of courses. Now I want to implement the bulk actions just like in other plugins. From where I can apply the delete and edit actions to ...
1
vote
1answer
51 views
Proper way to hook wp_get_attachment_url
I am trying to hook wp_get_attachment_url() with my custom implementation. I am trying to get my post images and any other static data from the Amazon S3 and I was wondering if I can configure the URL ...
0
votes
0answers
33 views
Click Counter Internal
We have the WP Click Info plugin installed that works well on counting visits to external sites. Is it possible to edit this so that it also counts all clicks on audio files within the site? Would ...
-1
votes
1answer
51 views
How to remove a class
Is it possible to remove classes from a plugin and add theme into to theme?
I need to modify Woocommerce WP_Checkout class but I want to move it to my theme folder so if woocommerce will be updated ...
-1
votes
2answers
393 views
How can I create a user generated photo wall
I'm looking for a way to create a user generated photo wall. Like a memorial site so to speak. I would have a big header image up top, than people could submit their own photo and it would post below ...
0
votes
0answers
37 views
Trying to understand the action: save_post and an incomplete $post object
I begin with a fresh post (i.e., add New). I fetch (via Ajax) an image (read: src) from another site. In the process of saving (action: save_post) I want to PHP copy() the image to my local server and ...
0
votes
0answers
26 views
Strange / unexpected results with add_action('save_post')
As I'm sure plenty of you know already, 'save_post' will actually fire multiple times for a given save. Rather than copy / paste the same 12+ lines of code every time I need just a single fire, I ...
1
vote
1answer
15 views
Archive - same title for the first two posts
I created an archive page called archive.php
Here I include header / footer and this code:
<?php if (have_posts()) : while (have_posts()) : ?>
<h1 class="entry-title"><a ...
2
votes
1answer
97 views
Creating a custom public user page
I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
0
votes
0answers
67 views
why ob_get_content is making mess [closed]
My new, just developed plugin is making a big mess. I'm using ob_get_content() to wrap included php files. On some action executed on other plugins(for example updating a post) the page is getting ...
1
vote
0answers
31 views
How to save the values of checkbox to the register setting?
<?php
function default_menu() {
<form action="options.php" method="post">
<?php settings_fields( 'sample_check' );?>
<input type="checkbox" name="sample" value="nofollow"/>
...
1
vote
0answers
17 views
Unit Testing a Plugin functionality with cron
I'm currently on the process of unit testing a plugin using the Wordpress unit testing framework.
In one of the functions to be tested,it will send mails to users in a periodic time interval so it ...
2
votes
1answer
30 views
nonces in custom oop plugin
How to use the check_admin_referer method with oop?
If I use as it follows the function can not be called:
class MyClass{
function __construct(){
if( isset($_POST['my_nonce_field']) ...
0
votes
0answers
15 views
Wordpress custom plugin admin tasks
how do I make an edit page to my custom Plugin? What I mean. I have in my plugins admin area items listed and initialized with an id and title, if I choose one element to edit where do I send the ...
0
votes
0answers
16 views
Allow Authors to add category in Multisite Inatllation [duplicate]
I am looking for a way, to allow authors, to add categories. Refering to this post: How would I increase the Author Role to be able to add a new category?
I tried this function:
function ...
4
votes
2answers
212 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 ...
0
votes
0answers
27 views
How to rename the core files in WordPress theme programmatically?
Is it possible to create a custom function to rename theme files? For example: footer.php is the file; When I activate a plugin it's renamed to footer1.php, or whatever, when I deactivate the plugin ...
0
votes
0answers
46 views
how to add interstitial page?
I am trying to get get the interstitial page. I have a plugin that fetches articles from an API. What I want is when user click on fetched article's link it should take them to a dynamic interstitial ...
0
votes
2answers
76 views
Yet another wp_insert_post infinite loop. What is wrong?
I am writing a plugin that enables subscribed users to submit posts of a custom type, and I am trying to implement this feature via shortcodes. Now the problem is that instead of inserting one post, ...
0
votes
0answers
19 views
NextGen XML Issues
I am using NextGen Gallery to generate an XML file via PHP. I have a jQuery plugin that is loading a photo gallery from that XML feed. I've gotten the two to work together. It works great when it ...
1
vote
1answer
662 views
How to check if certain plugin exists and in expected version
I've created plugin that goes to wordpress plugin repositories. Now, I need to create another plugin (sub plugin or child plugin you may call) that require this certain plugin to be already installed ...
0
votes
0answers
15 views
Odd behaviour caused by $wpdb->last_result and language switching
This has me scratching my head. The following code is called on two pages:
http://example.com/somepage/
http://example.com/fr/somepage/
class SomeClass {
function __construct(){
global ...
0
votes
0answers
23 views
Creating URL for custom php file
I'm having some trouble trying to figure out how to make a custom URL in the admin area for my plugin. I already know how to use the add_menu function, but I need to create a sub-page for the plugin ...
0
votes
0answers
37 views
What is the Correct Way to Use get_terms in a Plugin?
I'm currently writing a plugin for restaurant menu management. I have a custom taxonomy that I would like to retrieve the terms for from any page or post. Currently I have a sample dropdown list ...
1
vote
3answers
918 views
Help With MySQL to WPDB Query Conversion
I have a problem. I've got a PHP script that tracks individual file downloads, and I'm looking for a way to display that number in individual posts. I've got a half-baked solution- a plain ol' MySQL ...
0
votes
0answers
76 views
Wordpress plugin custom admin screens
I have managed to create my private messaging system, but now I want to make the user experience similar to both front-end users and to back end users.
What I have is a screen like gmail, which when ...
0
votes
1answer
52 views
Data Validation, dynamically generated fields (select for example)
Working to secure my plugin, I'm not sure what (if anything) to do about output such as dynamically generated select fields. For example, I have a country code select generated on the backend via PHP ...
0
votes
1answer
32 views
Structuring function with registration_errors hook
I created a plugin that adds a function to the registration process where the user info also gets added to an external db. The problem is that, when the function runs successfully i.e. user is able ...
-2
votes
2answers
303 views
Shortcode attribute “title” doesn't appear in $atts array
In a post, I have this text:
[bhours shortcode="test" title="test"]
But the "title" attribute appears to be ignored. Here's a var_dump of the $atts attribute array
array(1) {
["shortcode"]=>
...
0
votes
0answers
6 views
Registration_errors filter logic [duplicate]
I have a function that hooks into the registration_errors filter and adds a registered user to an external db. The problem is that even when the wordpress registration returns an error, the user is ...
1
vote
1answer
28 views
Issue plugin commands in admin settings page
What is the right way to issue commands in wp-admin? My plugin imports data from a set of RSS feeds via a cron job. Thats all working good. I've set up a custom settings page to change parameters, and ...
0
votes
1answer
38 views
Error: Call to a member function get_error_code() on a non-object
I am getting the following error when with the code that I wrote for my plugin:
Error: Fatal error: Call to a member function get_error_code() on a non-object in .../wp-login.php on line 335
I've ...
1
vote
1answer
33 views
How to display a message about updates in the plugin list
I am trying to use the hook in_plugin_update_message in order to display a one line message below the name of my plugin in the admin plugin list section.
However, the function called in the hook does ...
0
votes
2answers
42 views
wordpress remove views from action links in a custom post
I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post.
I have tried this snippet
add_filter( 'post_row_actions',array(&$this, ...
0
votes
1answer
40 views
Listing wordpress users with a search function
I'm having trouble finishing off this code that I adapted from Cosmoslabs excellent tutorial. Everything is working (listing and pagination etc) except the search function whic is returning nothing ...
0
votes
1answer
38 views
Is there anything special required to make a plugin work in a multisite environment?
I've been developing plugins for about a year now, but not having any experience with multisite environments, whenever a question comes up that is specific to that environment I'm generally stumped.
...
1
vote
1answer
65 views
Plugin screenshots not showing in the repository
I'm having major trouble getting the screenshots to show in my plugin.
I have validated the readme file and placed the screenshots in both the /trunk and /tags/1.0 directories (1.0 is stable). I have ...
0
votes
2answers
34 views
Disable plugin visibility at the plugin directory
Hello I have recently pushed my plugin's files to WordPress SVN trunk.
Unfortunately, it's not a ready to use release.
I don't want anybody accidentally download this half-baked 'release'.
Can I ...
1
vote
1answer
136 views
wordpress get meta value by meta key
How to get the meta value by meta key
I want to get the value by the meta key.
This is what I have tried so far:
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
...
1
vote
1answer
30 views
Creating a plugin to sanitize comment and the url field before display only
I want to create a plugin to sanitize comment and mainly the url field before display only (not before adding to database), to filter the url fields and only allow displaying this field only if it ...
0
votes
1answer
70 views
Restrict certain actions to plugin-specific admin menu pages only
I'm working on a plugin and want to restrict some things to my plugin-specific admin menu pages only. Therefore, I write the slugs being returned when adding (sub)menu pages into an array so I can ...
10
votes
2answers
417 views
Enhance Media Manager for Gallery
I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view.
I want to add a new select field on the right side and send the selected values to the gallery shortcode.
I ...
0
votes
0answers
10 views
Remove feed added with add_feed
I'm working on a plugin for something I need on my blog. I have really no experience with wordpress development or php.
I added a feed type by calling the add_feed($slug,$callback) function. Now the ...
-1
votes
3answers
186 views
Can I change header.php of current theme through a plugin function?
I need to add some html into the header.php but instead of directly changing the header.php of my theme or creating a child theme, how can I do it with just actions and/or hooks?
0
votes
0answers
129 views
plugin admin panel select box field value is not saving
I have this form, max_number_of_events input text is saving but the events_to_display select box is not saving. Any ideas? I'm a beginner WP plugin dev. Thanks!
function ...
0
votes
2answers
81 views
Most viewed post of custom post type
Im using following code for getting most populer post with thumbnail.I have a custom post type taxonomy (Talks). Custom post types(video) have 6 category.
But my code not working. It just getting 1 ...
1
vote
1answer
40 views
how to get all the child category name in a specified category name?
Supposed the specified category name is "product", which has three layered sub-categories. The structure is like the following:
product one
product two
product three
product four
I want to ...
0
votes
1answer
44 views
Doing action based on input from options menu
This is my first time writing plugin. I have managed to get options menu with the html form:
<?php
add_action('admin_menu', 'menu');
function menu(){
...
0
votes
1answer
60 views
Get a custom table to an array
How can I take my table I created like this:
global $wpdb; //Get all the wordpress database stuff
$table_prefix = $wpdb->base_prefix; //Get the global prefix for all sites (on a multisite ...
0
votes
2answers
33 views
wp_get_theme Warning: Illegal offset type
I'm using Post templates plugin. But its very outdated.
I'm getting Warning: Illegal offset type at this line
$templates = $themes[$theme]['Template Files'];
Here is my full function code.
...


