Tagged Questions

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

Is it possible to cancel a post status transition?

Question I want to cancel pending_to_published actions: Posts that match certain criteria should that go from pending to published should stay pending. (Alternatively, I need a to make add an ...
3
votes
1answer
2k views

Using query_vars filter

I am trying to link out from the WP admin to view posts in a specific way. The url structure for this is example.com/post123/?my-preview=456 /post123/ is the regular permalink for a post. The ...
0
votes
1answer
159 views

wp login redirect loop reauth=1

I am new to wordpress development and am trying to write a plugin. Following the recommendations in the book Professional Wordpress Plugin Development, I created a test page and placed it in the ...
0
votes
1answer
79 views

How to show custom taxonomy child posts through shortcode in WordPress

My question: I have custom taxonomy in WP named Videos and childs of this taxonomy named music-videos and game-videos. In my WP theme this is shortcode which shows ALL video posts from main taxonomy ...
0
votes
0answers
16 views

i want to display one comment at a time then after sometime next should be displayed in same place

<?php /* Plugin Name: My 1st Widget Plugin URI: http://example.com Description: Add my widget to theme Version: 1.0 Author: example license: none */ class my_1st_widget extends WP_Widget{ ...
0
votes
1answer
673 views

Ajax url value to pass 'variable' to use in query

I am in the midst of modifying a plugin in which I wish to get a value from a select list and auto-populate a textarea with values based on the selected value. The php code come from a file named ...
1
vote
1answer
72 views

Next and/or previous post content

How can I show the content in next or previous post? For example, I use this to display the next post link with title: <div class="alignleftfp"> <?php next_post_link('%link', ...
0
votes
1answer
232 views

How do I add a menu item to a Pods admin menu?

I'm writing a plugin that will send a notification message to an external queue whenever a menu item is clicked. This function is related to some customized data structures I made using the Pods ...
0
votes
1answer
103 views

How to share user data across multiple Wordpress websites?

i have 3-4 sites which has content about traveling,and what i want is one site(main site content all the user data and) in all other sites, users can log in to the sites with that data ,how can i ...
-1
votes
1answer
72 views

Wordpress 3,5 and Jquery version

I updated my WordPress installation to latest version (3.5)when i am looking at source code of my site, i saw following lines <script type='text/javascript' ...
0
votes
1answer
121 views

sanitizing/escaping plugin options

I have a plugin with a few text boxes that save the data in a serialized manner, the array is localized and printed in website front end to display custom messages. However, I just noticed that you ...
1
vote
2answers
115 views

like to keep reading plugin

I am using the like to keep reading plugin. I have created some code in index.html file. I use this code [like_to_read] some code here [/like_to_read] That is not working. But if I use in ...
0
votes
1answer
133 views

How to show an image popup when one clicks on an image thumbnail?

I have created a Gallery View shortcode plugin. I wanna add an feature to that which is - Whenever someone clicks on any image in that gallery, that image should get open in a stylish popup window. ...
0
votes
1answer
143 views

Add information to HTTP Header in WordPress Plugin

I am working on developing a plugin for a tool called Supportify. It is a REST API that is authenticated through a key and token added to the HTTP header of a HTTP request to their servers. Their API ...
0
votes
1answer
155 views

dbDelta using Foreign key not working on update [duplicate]

I am using FOREIGN KEY with dbDelta when activating the plugin (register_activation_hook()). It works great when creating the table for the first time, but outputs an error when updating the table ...
0
votes
1answer
141 views

Bootstrap Error in WordPress plugin

I am creating a plugin that generates advanced search queries. All of the UI is done in bootstrap, and the results are displayed via modal (bootstrap.js). On the production site Greenlane SEO I get ...
0
votes
2answers
33 views

Are there any official or unofficial guidelines for the styling of a widget?

I've designed a sidebar widget and found that on many themes the widget looks fine. However, certain themes make the widget look out of place (clashing with colors, bad contrast, etc.) Are there any ...
0
votes
1answer
38 views

Update plugin settings option_name for big plugin update

I am working on a plugin update and have changed the settings option_name and key. I would like that the old options are transferred to the new option_name. The old option name is: plugin_options ...
2
votes
1answer
288 views

Why does including a file in theme's functions.php not work?

For example, if I write some code (e.d. add a custom post type or something) in my theme's functions.php, it works fine. If I move it to a new file, then include() the file in my theme's functions.php ...
0
votes
1answer
181 views

Can wp_schedule_single_event be used to run background proccess?

I got a plugin that let users send invitations to their friends. If the user have like 4000 friends we run into trouble. At the moment i use a simple batch like the following for emails. But we also ...
0
votes
0answers
115 views

How can I use multi Media Uploader in a plugin?

I try to add the multi uploading options in a WordPress plugin. I repeated this code in the plugin (two times) only changing the ID. <script language="JavaScript"> ...
0
votes
1answer
502 views

Build dynamic page from cURL (HTML page) response with plugin

I feel like I am missing something simple here, but can't figure it out I need to have my plugin build links to a page that is built entirely via a cURL response. I am building a plugin that ...
0
votes
1answer
195 views

Next Previous Post in wordpress with previous / next link with title?

I recently tried the previous post and the next post button link. I do that with image in the left and right side of the site.Its working perfect.But i didn't know how to do this For Example: ...
-1
votes
1answer
1k views

How to fetch serialized data from wordpress options

I have the following serialized data in a wp option a:2:{s:5:"Title";s:11:"your title";s:7:"Message";s:20:"Hola testing testing";} I would like to return it to be used in a form, and show it also in ...
0
votes
1answer
953 views

Serialize data for wp options

I am creating my first ever plugin, its purpose is to show a notice when some conditions are met, I created the function in jQuery and initially I had to manually edit the file everytime I wanted to ...
0
votes
1answer
410 views

How to get error object returned by wp_create_user

I'm creating a registration widget for my wp site and it works as expected, however if the user already exists I need a way of retrieving that information. I'm using ajax to make the call here is my ...
1
vote
1answer
159 views

Best approach to fetch data from wp options to js file or php file

I am creating my first ever plugin, as I am not a programmer, I have been following tutorials and reading the codex, etc. My plugin consist in showing a notice to users when certain conditions are ...
1
vote
1answer
100 views

How a deprecated function can crash WordPress site while upgrading

It is said that deprecated functions used in plugins & themes can crash a wordress website while upgrading to newer version, I want to see an example of deprecated function that can cause a crash. ...
4
votes
1answer
269 views

How to get vim to autocomplete WordPress API functions?

I guess built-in omnicomplete is a start, but perhaps we're talking some neocomplcache plugin module or something themsuch? Googling "vim wordpress autocomplete" doesn't really give much.
0
votes
1answer
92 views

How to use existing hook in twentytwelve to all theme of wordpress?

I Recently tried to read the tutorial for wp_footer and also twentytwelve_credits for creating a sample wordpress plugins. wp_footer hook to display the footer beneath the page area. ...
3
votes
1answer
183 views

WordPress Capabilities: edit_user vs edit_users

The official documentation only mentions edit_users, but in the source I found many places are using edit_user, what is the difference? Are there any conventions for singular and plural capabilities? ...
0
votes
1answer
52 views

Load stylesheet in edit category page?

I have a plugin that I want to add a stylesheet to each "edit category" page because I added additional custom fields into those pages. Is there a simple way of doing this or do I have to use the URL ...
0
votes
2answers
1k views

Check if email address exists front end with AJAX in a plugin

I am pulling my hair out trying to figure this out. I have followed the wordpress codex here for AJAX: http://codex.wordpress.org/AJAX_in_Plugins All I keep returning is 0, I never get a 1. Any idea ...
1
vote
1answer
265 views

When is it too late to call the action wp_enqueue_scripts?

I'm creating a plugin that always enqueues a script in the footer. I also have a function that if called would enqueue an additional script that depends on the other one. Here is the basic format of ...
2
votes
1answer
215 views

calling jquery function on plugin page

I am trying to call the following script on a plugin admin page: <?php function add_match_attendance_scripts() { $output = '<script type="text/javascript"> jQuery(function () { ...
0
votes
0answers
69 views

Is it possible to make Wordpress as a RESTful app?

I'm planning to create a Wordpress plugin that accepts data via cURL and sends a JSON reply. The plugin will save the data in the database upon receive so there has to be some authentication and will ...
0
votes
1answer
94 views

Change Admin menu placement using hooks

I have been working in a wordpress multisite installation. Where I am using upPrev plugin that has an option page under Appearance ->> upPrev Now what I need is to move this menu under Settings ->> ...
0
votes
1answer
44 views

how to get the top 10 popular blogs

Our wordpress sites have many many users, each of them have an blog account, they can write posts,comments and so on. Now I want to find out the top 10 popular blogs, according to or order by ...
0
votes
2answers
176 views

Conditional check to see if a bootstrap.css is included in a theme

I am creating a shortcode plugin for Bootstrap framework that will go along with my theme. However since this would be released to the plugin, if a users's theme already has Bootstrap.css included, is ...
3
votes
1answer
645 views

Where the Nickname is being used in WordPress

I see most of the place is using the "Display name", so why I need to set a Nickname? Where it is being used?
1
vote
0answers
460 views

How can I save a multiple select array with the settings API for a plug-in options page?

I'm thinking this may be more of a problem with my PHP rather than my use of the settings API, but I can't seem to get Wordpress to save an array of data for a multi-select box. The multi-select box ...
0
votes
1answer
233 views

Prevent multiple counts by same user - WP PostViews plugin

I am using WP Post Views plugin to display the post number of views. To do so, I use: <?php if(function_exists('the_views')) { the_views(); } ?> The problem is: The plugin increments the ...
0
votes
1answer
51 views

How does wordpress distinguish a plugin's main php file from other php files? [duplicate]

If my plugin has multiple php files in its plugin folder, how does WordPress know which is the main php file ?
1
vote
2answers
28 views

Is it possible to add an action to the currently running action?

My question is very simple but I haven't found this answer yet. Here's an example: class MyClass { public function __construct(){ add_action('init', array($this, 'init')); ...
-1
votes
3answers
2k views

change add to cart button link [closed]

I'm new to WordPress and the WooCommerce plugin. I'm creating a plugin to change the add to cart button link if it hits a desired stock quantity. For example if stock qty is above 50, I would like to ...
1
vote
1answer
254 views

Remove rewrite rules generated by plugin during deactivation‎

I have a simple plugin like the following add_action('generate_rewrite_rules', function ($wp_rewrite) { $wp_rewrite->rules = xxx + $wp_rewrite->rules; }); if (is_admin()) { ...
-2
votes
2answers
41 views

remove () from category number [closed]

I have found this code here. $args = array( 'hide_empty' => FALSE, 'title_li'=> __( '' ), 'show_count'=> 1, 'echo' ...
0
votes
0answers
504 views

How to give a download link to a .csv file from the custom plugin?

I have made a custom plugin, which exports MYSQL table contents into a .csv file which gets saved in to wp uploads directory. Now, I am trying to give a download link for downloading directly a .csv ...
0
votes
1answer
76 views

What could cause a WP Option to get truncated?

I have a WP plugin, where all admin setting field values were suddenly changed to the letter 'a'. All settings are stored in one 'big' option in the table. Seemed like the serialization gone wrong. I ...
1
vote
1answer
249 views

Correct way to perform non-cacheable DB query

Consider the code function getNow() { global $wpdb; $now = $wpdb->get_var("SELECT NOW()"); $wpdb->flush(); return $now; } I am using the above method to avoid caching ...