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

How to remove/replace current page template?

I am writing a plug-in that creates new front/home page from scratch. Below code works nice and it outputs the text before the themes outputs anything. So the question is how can I remove the theme ...
0
votes
1answer
117 views

Error on using __FILE__ for add_menu_page() Function

I am trying to creat an custom option page but I ham getting error on setting the add menu page() function. I need to use the FILE as the $menu_slug 4th parameter of the function ...
0
votes
1answer
61 views

Updating Style From WP Options Setting Page

Can you please let me know how I can set a function to update change the style like any CSS class from the setting option page? For example I have some <P> elements with a class name .impo. Now, ...
1
vote
1answer
86 views

Check for template part, else filter content

In a plugin which brings its own post type to the table, I wish to handle post_meta by filtering the_content - unless the user has provided their own single-{post-type}.php template. Should I run ...
0
votes
1answer
152 views

How to log custom plugin error to debug.log file

I was searching google for this on how can log my plugin error's to debug.log after enabling the define('WP_DEBUG_LOG', true); but there is no luck for me, any expert have done this before? Please ...
1
vote
1answer
181 views

How use %like% in sql statement wordpress

i use a like %text% statement in wordpress: SELECT * FROM location WHERE name LIKE "%on" OR name LIKE "%on%" i tried anything but it's not run: $wpdb->get_results($wpdb -> prepare("SELECT ...
0
votes
1answer
360 views

Getting error of unexpected output during activation

I have seen one plugin named lordlinus business hours When I am trying to install it, I am getting error : The plugin generated 2 characters of unexpected output during activation. If you notice ...
0
votes
1answer
1k views

How to create custom home page via plugin?

I want to code a plug-in that creates new custom home page. Note that I have never coded any plug-in before. 1) After activation of plug-in user needs to go to the options of the plug-in and set up ...
7
votes
5answers
216 views

What is the importance of writing a < WP 3.x compatible plugin nowadays?

I am currently writing a simple-ish plugin with custom posts and a couple functions, using post metadata and adding a couple of variables to the "options" table in the database. During my research, I ...
0
votes
0answers
24 views

How to return a different page than the one requested

Description of the problem I am now developing a plugin whose purpose is to change the contents of the page a user requested depending on different variables (like, for example, user's location). By ...
0
votes
1answer
108 views

Quick press publish post hook

To execute a function during publishing post publish_post action hook is used. But what is quick press post publish hook?
2
votes
0answers
70 views

Ethics question: what qualifies as a fork? [closed]

I recently came across the need for a WP plugin which did not exist and so I started working on a plugin of my own. In my search, I found non-published (in terms of availability on WP.org) code about ...
0
votes
0answers
83 views

Use custom clean URLs for a plug in

I've created a plug in that displays a list of items from the database. I need to link from an item to the item description page, however instead of the link looking like: ...
0
votes
1answer
455 views

Add a Custom Field in Comment Box next to the Text area

Good Day. I Recently try to figure out for adding the custom field in the comment box it working fine. Still I need to know how to add the custom field after the comment box. I am not sure how to do ...
1
vote
1answer
223 views

Publish Post After Click On A Link

I have a frontend posting form (CF7), where user inputs (among other data of course) his email. Now I set the status to pending. What I want is, that the user would get trough autoresponder a mail, ...
0
votes
1answer
29 views

Active Plugins for current blog in WP Multisite Network? [duplicate]

Simple question but I can't find an answer - how do I find whether the current blog in a multisite network has a given plugin activated (speaking about plugins that are available to all sites on the ...
0
votes
1answer
56 views

Wordpress dynamic widget by location?

i need to show the widget based on user location , for a testing purpose i have created the by using following code if( function_exists( 'register_sidebar' ) ) register_sidebar( array( ...
0
votes
1answer
77 views

How to enqueue scripts in right way in a plugin?

I am developing a wordpress plugin and just came out with a problem with enqueue scripts. I want to enqueue JQUERY UI (.js) and (.css) in my plugin. Is it better to enqueue it from Google CDN or ...
0
votes
1answer
159 views

How do you create a re-useable HTML fragment in wordpress

Let's say you want all pages to have a common footer, and have that footer editable in WordPress; how would you accomplish this? My current solution is to create a page "footer" and include it using ...
1
vote
0answers
637 views

how to use shortinit in wordpress

I want to load a minimal resources in Wordpress because the server that I'm working on is very slow. I tried defining short init in the wp-config file: define('SHORTINIT', true); But then I got ...
0
votes
1answer
388 views

What is the difference between Null vs Empty (Zero Length) string?

In a shortcode context, is there any difference here? array( 'slideshow' => '', ), and array( 'slideshow' => NULL, ), Is there a best practice for that?
0
votes
1answer
91 views

How to save post change url youtube link?

In functions.php i using this to change width url from youtube: add_action('save_post', 'set_url_youtube'); function set_url_youtube() { $post = get_post($post_id); $content = ...
0
votes
1answer
1k 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
1answer
258 views

Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script

Short version: I'm able to get a PHP variable into a JS file using wp_localize_script. On JS file i'm able to echo the variable using console.log, but I cannot get it echo into the jQuery plugin's ...
0
votes
1answer
807 views

admin page passing $_POST variables to itself

I'm new to wordpress but I really like this and I would love to write my applications inside of wordpress. However there are still many things to learn and after a while one can lose it's head, as I ...
3
votes
1answer
298 views

Determine which theme location a wp_get_nav_menu_items is for

Is there a way to determine which theme placement a menu is for when modifying it with the wp_get_nav_menu_items filter hook? I'd like to only add items to certain menus and I don't want to have to ...
0
votes
3answers
42 views

Class variables not correct on page

I'm trying to make some of the variables from my plugin available for an instance of the class on my page. But it's not showing up the correct values. Here's the relevant part of the plugin: class ...
3
votes
1answer
2k views

What are the differences between WPINC and ABSPATH?

It's common for plugin developers to protect their plugins from direct access. I saw two ways to do that: if ( ! defined( 'WPINC' ) ) die; and if ( ! defined( 'ABSPATH' ) ) exit; What are the ...
1
vote
4answers
2k views

how to return only custom fields using get_posts()

I'm trying to get only the fields that I need using the get_posts() function in Wordpress. I currently have the following code: $posts_args = array( 'orderby' => 'post_date', ...
5
votes
3answers
607 views

Trouble with Transient API when W3TC is activated [closed]

I'm using W3 Total Cache 0.9.2.11 on Wordpress 3.5.2. I've got a problem with transient API and w3tc's object cache setting. When I activate 'object cache' with memcached (other settings are ...
0
votes
1answer
44 views

how to load a file from a plugin when a url is passed

I'm creating a plugin where a file is loaded and if a link is clicked, it passes some variables that are appended to the url. So if a link is clicked it will change the url by appending ...
0
votes
1answer
141 views

Adding parent custom post type menu option

random problem for me here. I have several custom post types registered to Wordpress and I want to add the archive pages to the menu, but I do not want them to be static links. Is there any way to ...
0
votes
1answer
177 views

Many Field in Front End User Registration form insert as post

I have requirement More then one field in registration form which i have build as above but there is some problem and it will not insert in wp-post table. ...
0
votes
1answer
84 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
3k 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
177 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
92 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
1k 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
78 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
319 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
118 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
77 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
158 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
126 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
151 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
170 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
218 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
244 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
40 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 ...