1
vote
1answer
31 views

Making Quote Plugin more efficient

I've been working on this plugin the past couple of nights and have been jotting down idea's of how to improve it. My knowledge of php isn't the strongest and I'm learning as I go along most of the ...
0
votes
0answers
10 views

function triggered by “manage_users_custom_column” filter not working

I am trying to add a custom column un users.php but it stays empty. I have successfully added a column to the users admin page with this code in my theme's functions.php file: function ...
0
votes
1answer
32 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
1answer
16 views

Permission error on plugin save

When I pass a quote to the input field and save it I get this error message in wordpress - I'm using the latest installation version. Error "You do not have sufficient permissions to access this ...
0
votes
0answers
15 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
0answers
19 views

Dynamic banner for use on external sites

Pro question: we would like to display our most current wordpress articles on external sites (something like advertisments or banners). I think this could be easily done with iFrames, but I doubt ...
1
vote
1answer
57 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
1
vote
0answers
38 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
1
vote
1answer
51 views

Common functionality between my own plugins

I read that when creating new post types, creating a settings page, and creating a new taxonomy, you should create a plugin. So I have done that. But I have functionality, which could be generalized, ...
2
votes
1answer
50 views

How to Loop Plugin Option Field Set?

Problem/Background Currently, I'm creating a plugin for a client that will enable them to mark and modify predetermined Google Map polygons (displayed on the site) in the dashboard. I want to let ...
0
votes
0answers
21 views

how a query can use local parameters in plugin function?

I've wanted to add a custom post type, so i've done a plugin to put on/off this post type. i have widgets inside the plugin in order to print posts with this custom type, that call more or less a ...
0
votes
1answer
27 views

How can I add a Custom Button to Add or Edit post / page next to Add Media?

I'm trying to add a custom button nearby the Add media on the wordpress Add and Edit Post/Page. How can I do that? Thank you very much for your help!
0
votes
0answers
20 views

How to Overwrite validate_plugin function

How can I overwrite the WordPress validate_plugin function. I need to disable that function alone for my plugin, and it should not affect any other plugin. I don't want the validate_plugin function ...
0
votes
0answers
19 views

How to add a handler for a button in plugin?

I am working on my first plugin, and I am having some confusion. I am trying to figure out how to set a handler for a button on my plugin UI. Here is how the button is displayed: <li ...
0
votes
1answer
58 views

Execute Jquery when a specific page in my plugin is loading

I am building a plugin and I would like to be able to hide the wordpress admin side menu and top bar when a specific page is shown(or menu item clicked)? Should I call the jquery directly as a ...
1
vote
1answer
45 views

Wordpress Plugin Page is Loading in Admin Content Container Instead of Separate Page

I am creating a wordpress plugin that has it's own UI. It looks like a standard web application, so everything that is done within the plugin is handled in this UI instead of integrating it with the ...
3
votes
2answers
100 views

When is it appropriate to put functions on page template vs. functions.php?

I'd like to improve my code and on a current theme, I've extended Wordpress with custom post types, metadata, customized user authentication, and a number of other items. Some of these functions ...
0
votes
0answers
76 views

WordPress function get_the_terms() returns 'Invalid taxonomy' error

It seems that the function get_the_terms( $id, $taxonomy ) always returns an error if used outside of WordPress (i.e. integrated in PHP using this method). I believe some library might be required and ...
0
votes
0answers
30 views

Customized Upload File Control not saving the files URL as value

I have modified a customized version of the Upload File control so that I could upload mp4 videos and use the media library. The control seems to be saving the videos as 'Array'. After uploading a ...
0
votes
0answers
28 views

Can anyone tell me why I can't edit a plugin when it is installed without having to re-install?

I am using a shortcode plugin as a framework for the short codes I want to add that go with my theme. I decided to just include the plugin in a repo for the user to dl so I am not building theme right ...
0
votes
4answers
97 views

How to include code into functions.php file via a plugin

I have a lot of custom code in my functions.php file, what I would like to do is move all of this into a plugin for example myplugin-functions.php and then include the file into the themes ...
0
votes
1answer
149 views

Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions

At first I thought it was a browser issue, but it looks like my code only sets a cookie if the user is logged in the administrator. If you are not logged into the Administrator account then it does ...
1
vote
1answer
41 views

wordpress plugin is not activating from widget

I am just creating a plugin in wordpress. In this plugin I am trying to create a widget, In that widget it will show a title, input text and text area in the widget section and when the values will be ...
1
vote
1answer
82 views

Can wp_list_comments output into variable?

Is there any way how to output wp_list_comments() into a variable? Something like $output = wp_list_comments(array('reverse_top_level' => false ), $comments); I am writing a plugin and it would ...
4
votes
1answer
178 views

Why does WordPress add 0 (zero) to an Ajax response?

Unless I end Ajax processing function by exit() or die(), the Ajax function receives desired and correct output but following by 0. Any idea why is that happening? Is that meant to be like that or ...
0
votes
1answer
45 views

My widget won't update its values when save is clicked

So this is my first attempt a creating a widget that has a functionality of creating a simple image rollover effect (if anyone wants it when it's done, leave me a message). Now I downloaded a sample ...
0
votes
1answer
289 views

is user logged in not working

I am creating a plugin and wish to check if the user is logged in the run another function. This is my first ever plugin and i am still learning how to program at the same time. following I have a ...
3
votes
1answer
218 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 ...
2
votes
1answer
128 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
277 views

How to access function from outside of a class within this class in WP plugin?

I am developing a WP plugin called e.g. DD_Awesome_Plugin and this is my code so far (simplified version without additional code logic within class functions): class DD_Awesome_PLugin { public ...
0
votes
0answers
62 views

WordPress Popularity Score relative to all posts (score views, shares and comments)

I am trying to find a solution to score my posts in an effort to visually represent how "hot" they are, relative to other posts, or relative to a score of 1. I have views, total shares and comments ...
0
votes
1answer
175 views

Custom Function for SEO by Yoast plugin

We use a very customized version of WordPress for some of our index/root site pages where we use a custom meta box for custom permalinks. What we are looking for is a custom function that basically ...
0
votes
1answer
444 views

Shortcodes, output buffering, and WordPress functions

I have a couple of long forms which I want to output as shortcodes. Shortcode API indicates that If the shortcode produces a lot of HTML then ob_start can be used to capture output and convert ...
0
votes
1answer
1k views

Different registration form for different roles

I have customised the worpress registration page by adding new fields using the Cimy User Extra Fields plugin so my site is now fine for allowing users to register as contributors. I now want to ...
0
votes
1answer
81 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
2answers
82 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. ...
1
vote
1answer
139 views

plugins_url() works everywhere but wp_reqister_script()

So I should probably mention up front that I'm developing a plugin so my url is 'mysite.com/plugin' (Just in case this is related to my issue. So, In my main plugin file (myplugin.php) I have added ...
0
votes
3answers
128 views

Trouble using wordpress functions in a pop-up modal form

I'm working on a plugin and I've added a button to the tinymce editor that pops up a modal form, with options for the shortcode, and then inserts the shortcode with the selected options in to the ...
2
votes
2answers
133 views

Placement of Code in Plugin for hooking `save_post`

I ran into a strange Problem today developing a new Plugin. I set it up as usual, creating the f711-roomprice folder in the Plugindirectory, and creating the f711-roomprice.php as well as an inc ...
1
vote
1answer
1k views

Edit Yoast SEO breadcrumbs output

I want to customise the output of Yoast SEO breadcrumbs, I have this so far which works great: add_filter( 'wpseo_breadcrumb_single_link', 'ss_breadcrumb_single_link', 10, 2 ); function ...
1
vote
1answer
134 views

I would like to use create a function in my custom plugin to tell WP to use a different header

I am well aware of the use of child themes for this. I know about get_header($name). I already understand the use of conditional tags. I want my plugin to remove the function: function get_header( ...
0
votes
1answer
69 views

Call current post parameters inside a plugin

I edited the plugin WP User Frontend (for editing posts from frontend) to have two different edit pages for two different post types. Here's the original function which handles the edit_link. ...
0
votes
1answer
829 views

wp_get_post_terms Order by not working

wp_get_post_terms Order by not working My code is here query_posts(array('post_type' => 'product','post__in' => $product_ids,)); while (have_posts()) : the_post(); global $post; $args = ...
1
vote
1answer
908 views

Using wp_get_image_editor in a standalone script

With WP 3.5, they updated the image resizing scripts with wp_get_image_editor. Currently, in this standalone script that is accessed with Ajax, I have included wp-load.php so I can access all of the ...
0
votes
2answers
101 views

How can i call from custom fields to the category editor?

I found this code for custom field add category editor. I added custom field to the Category. e.g. My field name is Hastag and i have a Sport category. And i want to call display Sport's custom ...
0
votes
1answer
78 views

How can i listing current category and Featured Category post list?

I have a Featured Post Category. Im marked some post Featured. When i viewing a category page(e.g. Sport), i want to list on sidebar both marked post list (e.g Featured and Sport,) I tryed with that ...
0
votes
1answer
98 views

How can i list random author?

Im listing current category of all author list but I want to list random author list from current category. I was try 'order' => 'RAND', RAND code its not worked. My Code: function ...
0
votes
1answer
226 views

How can i list current author's categories?

My Code getting authors written post categories but just 2 ID has author lists category.. I replace $current_user->ID but it is not worked. <?php $categories = $wpdb->get_results(" ...
0
votes
1answer
118 views

Wordpress get_avatar function not correct working

My code doing this, listing which author have posted in the current category. But get_avatar function not correct working. Im Using Simple Local Avatar Plugin. It is working author.php don't have any ...
0
votes
1answer
50 views

How to list posts that appear in two categories

I would like to list all posts that appear in the current category being viewed that are also posted to a second category. Example Pictures : LINK For instance, a listing of the common posts between ...