0
votes
0answers
7 views

How to add jquery to my custom post type wp plugin

I want to include a jquery to my wordpress custom post type plugin which i have created. i have two doubt,,, the jquery script will work only on widget options (i.e) Sidebar. So when i use the ...
0
votes
1answer
15 views

Update post meta not working on wp_postmeta

I am trying to update post meta values but it does't work. Only function that is working is get_post_meta and add_post_meta but Update wont work at all. Also I tried to change the values using ...
0
votes
0answers
29 views

remove_filter right way

What is the right way to remove filter in condition? method 1 public function update_loop($query) { global $wp; if(!$query->is_main_query() || $query->is_admin) return; ...
0
votes
2answers
33 views

How to cancel Wordpress' action/filter when using OOP with anonymous callback

Most of the wordpress plugins I found is functions based, for example, the offical akismet plugin function akismet_init() { global $wpcom_api_key, $akismet_api_host, $akismet_api_port; // ...
-2
votes
0answers
14 views

Message wall for users in Wordpress [closed]

I would like to build my first plugin for wordpress. It will be a facebook style messsage wall. I would like to collect ideas from experts about it. How can I store the messages for the users, user ...
0
votes
1answer
20 views

Don't load the theme for a page FROM a plugin EDITED

I'm developing a pseudo admin area for my client and they don't want the theme overlaid on it, rather have their admin area take up 100% of the page. Normally I would add if (!is_page($id)) and be ...
0
votes
1answer
15 views

Why tinyMCE.editors doesnt work on tinyMCE

<?php /* Plugin Name: Taggr Plugin URI: http://example.com/wordpress-plugins/my-plugin Description: Premium plugin for image and photo tagging Version: 1.0 Author: Tee Kai Yang Author URI: ...
1
vote
1answer
19 views

Howto check version of another plugin and then add a submenu page to it

i'm writing a plugin which requires another plugin. So i have to check first if the other plugin exists in a correct version. If yes i want to add a submenu page to the plugin page but here my code ...
0
votes
1answer
32 views

How to prevent plugins from loading jQuery

I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file. The plugin is ...
0
votes
2answers
17 views

How can I modify admin bar only if my plugin is loaded

If I want to always change the admin toolbar at the top of the page it's easy. add_action('admin_bar_menu', 'add_toolbar_items', 100); function add_toolbar_items($admin_bar){ ...
0
votes
0answers
8 views

wp_parse_args not insert it to options

wp_parse_args not inserting default value to options. But its printing results. $options = get_option('my_options'); $defaults = array ( 'logo' => 'http://domain.com/logo.png', ...
0
votes
0answers
8 views

Template redirect inside of plugin not redirecting

I have this inside of my plugin but it's not loading it ... function templateRedirect() { if(is_home()){ echo 'hello'; } } add_action('template_redirect', 'templateRedirect');
1
vote
1answer
20 views

Read text defined under __()

I am new to WP Plugin development. I have a theme where texts are included inside __() function for translations, like: __('This is text to be translated'); I want to create a plugin which would ...
0
votes
0answers
35 views

UPME Known Issues - Unable to Save Custom Fields

When you have large number of custom fields, there are issues with saving and updating process. This is due to the maximum input variables constraints set by PHP. Currently you have to increase php ...
0
votes
0answers
24 views

Get custom post archived by meta field value in wordpress

I am using cpt-archive plugin to generate archive by month in my wordpress post. Here the plugin using this code, $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, ...
-3
votes
2answers
34 views

php include returns 1 as output with other outputs [closed]

I have this code $return = include(TEMPLATEPATH . '/apex.php' ); $html .= $return; I using the above code to get a php for from a plugin from theme dir. but it returns 1 with the other wanted ...
0
votes
1answer
15 views

Validating values using Settings API?

I'm using the Settings API to create options for plugin. Do I need to validate the input values for the security (for example stripslashes etc)? (I could not find that part in most of the tutorials). ...
0
votes
1answer
34 views

appointment plugin doesn't display all appointments

I'm trying to create a appointment plugin, and so far it is working that I can create appointments and see the detail view from the appointment. The problem is, on a page called "appointments" where ...
0
votes
0answers
24 views

register_activation_hook not working with symbolic links

I'm writing my first own Wordpress plugin. It's working great so far, except that now I need to create a few DB tables upon plugin activation. So I put register_activation_hook( __FILE__, ...
0
votes
0answers
35 views

How to link PHP pages not included in menu?

I'm developing a plugin which has basically four pages in menu, each page contains a form that the action value should link to another page (not included in menu). My questions are: how do I link the ...
0
votes
1answer
21 views

How to tell which Plugin is displaying?

I'm editing a Wordpress website for a client that was written by someone else. I'm noticing that a video and button are displayed on the home page. I used the Reveal-Template plugin to figure out ...
0
votes
1answer
29 views

Extending a theme: build new features as plugin or core modules?

I have developed my own WordPress theme based on the Roots starter theme. Because of my clients needs, I'm often required to develop custom features (what I refer to as "modules") that are added to ...
0
votes
1answer
17 views

How to set the default value as the saved value once a form of widget is saved?

I tried doing this for the function form : <?php function form(){ //Set up some default widget settings. $defaults = array( 'uid' => __('121232', 'example'), 'height' => ...
0
votes
0answers
31 views

Change wp_mail SMTP settings for each E-Mail

I want to send mails using wp_mail function. I have multiple SMTP accounts login details. I want to send some mail using Account A and some using Account B. How can I send mails with different ...
0
votes
0answers
42 views

How to let user know his session has expired and show him a popup?

Can anyone knows how to show a popup once user session has expired? This is what i want to achive When User has been automatically logged out due to inactivity or session expiration I need to show ...
1
vote
1answer
58 views

Unable to override pluggable function wp_mail

A couple of days ago, my wordpress blog hosted on openshift suddenly stopped sending me mails and notifications. Until now I'd never bothered how wordpress handled mail sending since they always ...
0
votes
1answer
14 views

Plugin options not appearing on options page using tabbed navigation

I've modified the plugin options page for my plugin to use tabs, using the existing WordPress system for this. However, The actual options are not appearing on the screen - just the tabs and the "Save ...
0
votes
1answer
56 views

Display_rows() and column_cb() strange behaviour

I found a strange behavior of my functions. I thought to pass the id from display_rows() to column_cb(), but the problem is that the program passes only the first digit. Any hint? column_cb(): ...
0
votes
0answers
81 views

Adding a dropdown list box to the comments page

I'm creating a plugin that will add a dropdown list box as an additional field on the comments page. The data in the dropdown is not being added to the MySQL database. Can someone take a look at my ...
0
votes
0answers
37 views

Adding Attachment Display Settings in custom media frame

I made my own custom media frame : $('.add').bind('click', function(event) { event.preventDefault(); // Create the media frame. file_frame = wp.media.frames.file_frame = wp.media({ ...
0
votes
0answers
25 views

How to add links under every posts? ( WHILE BUILDING PLUGIN not manually )

I want to use, change, add and delete the links that appears with every posts. (e.g. May 21, 2014| 1 Comment) If I'm not wrong these are called template tags. I can play with them manually by getting ...
0
votes
2answers
28 views

Wordpress plugin options need to delete after deactivate & uninstall

I have developed a wordpress plugin and I need to delete the options I am creating when uninstalling. What I did is I created a file called uninstall.php and included the following code: <?php ...
0
votes
3answers
81 views

How to change commenter links to /user/user_id?

I would like to change the commenter links as shown in this screenshot: In my test plugin at GitHub I have first tried the following code: define('PROFILE', '<a href="/user/%s" rel="external ...
0
votes
1answer
102 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 ...
1
vote
3answers
229 views

How to display public user profile with 2 additional fields? (GitHub source code included)

As a WordPress newbie I am trying to create a plugin, which will force users to specify their city and gender while registering and then display a personal profile page for each user showing this ...
0
votes
0answers
24 views

Custom post not working on template page

I am using promotion-slider plugin. I am writing <?php echo do_shortcode('[promoslider]') ?> but it has been very inconsistent. As sometime posts are coming some time it does not. I am not able ...
0
votes
1answer
23 views

Execute certain function on GET request

I am currently designing a plugin which will export some data in admin panel, only when a GET parameter export=data is passed. In normal PHP it will do something like: <?php ...
0
votes
2answers
33 views

Plugin generating unexpected output - on WP mysql dump import

I am developing my plugin and I am getting this error: The plugin generated 357954 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with ...
0
votes
2answers
89 views

Post curl function save twice using plugin hook function wordpress

when i save a data with my curl function using hook to save a data twice. public function __construct() { add_action('init', array(&$this, 'init')); ...
0
votes
1answer
42 views

Avoid class name collision when using third party libraries in plugins?

I am currently developing a Wordpress plugin handling very specific behaviours in our new Wordpress website. I started by reading the introduction articles in the Codex, and I also found the Wordpress ...
1
vote
0answers
55 views

Manually set a custom admin sub-menu selected?

This question might have been asked already, and if so I apologize but none of the other answers pointed me in the right direction. I am developing my first Wordpress plugin. Lets say it contains the ...
0
votes
0answers
28 views

Proper Failure of Plugin Activation

I am currently developing a plugin, which depends on another plugin (json-api). I use the following code to check for the presence during startup and in the constructor, in case the json-api plugin is ...
1
vote
3answers
60 views

Checking if an attribute exists in a shortcode

I've written a small plugin that spits out html for a button. It works great, except for one thing: If the user doesn't specify an image, the image appears broken. Is there a way for me to check and ...
0
votes
1answer
27 views

How can I pass value to function in add_menu_page?

I was use to pass value to function for the below menu. add_menu_page('Competition Manager 2013-2014', '2013-2014', 'manage_options', 'manager_2013_2014', 'manager_2013_2014', plugins_url( ...
0
votes
0answers
17 views

The plugin assign to the wrong place (layout problem)

<?php /* Plugin Name: Push notification Plugin URI: http://wordpress.org/plugins/temp/ Description: No description Author: Temp Version: 1.0 Author URI: http://ma.tt/ */ // This just echoes the ...
0
votes
1answer
53 views

Saving an array to get_options

I'm trying to save an array to get_options in wordpress, I'm aware that I don't have to serialize the array due to get_options doing that. At the moment I don't get any success of failed message upon ...
0
votes
0answers
50 views

How to allow users to upload files to a subfolder of my plugin, or without running into permission issues?

My plugin has a form in admin dashboard, allowing users to upload files. Now, when I grab this file, via $_FILES, is there any way I can save it to: example.com/wp-content/plugins/myplugin/subfolder ...
0
votes
0answers
23 views

Saving plugin data returns “You do not have sufficient permissions to access this page.”

I'm developing a quote plugin which will save a quote to the WPDB using a form to input the quote. I've created half this code and got the other piece from another programmer on here. I'm looking to ...
0
votes
2answers
55 views

Change page according to fetched GET Parameters

I want to write plugin which has the ability to change the start page according to a get parameter: The following code is the full plugin. function GET_Different_Page_on_front_parameter() { if ...
1
vote
2answers
62 views

Way to hook into a sidebar call to replace it with a custom sidebar

I want to replace the sidebar-2 in the twentyforteen theme with a custom sidebar based on a conditional statement for CPT. So if the page is showing a certain custom post type then show my custom ...