Articles of plugin development

WordPress security issue to output data from user input from theme option form

I have the following code (below) in my theme. I am using redux framework for my theme options. My codes in a part looking like this. And I am really not sure about the security issue of this chunk of codes. Please any expert help me indicating any security problem in here. Your few minutes […]

Plugin options not being saved or created

Having a lot of trouble with this config page. I have followed the documentation (which was sparse) and done a bit of searching for help. My problem is simple, my config options aren’t being created or saved. Any help would be much appreciated! Here’s the general set-up: public $view; function __construct() { $this->view = new […]

Issue with pre_get_posts on custom post type archive pages

Overview I am creating a theme which has 2 custom post types (as custom plugins): Articles Reviews I have also created single-articles.php and archive-articles.php templates inside the plugin. Same for Reviews CPT. BOTH the custom post types use the default WordPress Taxonomies (categories and tags) My Reading Settings are set to “A Static Page” Front […]

admin_notices hook show message all admin pages after plugin activate

I am working on a plugin and in plugin i use admin_notices hook for showing my custom message. When a user activate plugin the message show blew the plugin activate successfully, but my message shows all the other admin pages. I want to show message only the plugins page after plugin activate or my plugin […]

Pages 404 in wordpress

First of all, I am very new to wordpress and know almost nothing about it. When I create the page foo using in wp-admin, I get the message that the page is created. When I click on view page, it 404s. I’ve followed the steps on http://codex.wordpress.org/Pages#Creating_Pages, but apparently I’m missing something. I let WordPress […]

Loading jQuery and jQuery plugin script files correctly

This question already has an answer here: How is it possible that the function of the test page works, but it does not go live? 2 answers

building plugin and it is displaying above plugins page

this is the issue: add_action(‘admin_menu’, ‘bittech_login_settings’); function bittech_login_settings() { add_menu_page(‘BitTech Login Settings’, ‘BitTech Login Settings’, ‘administrator’, ‘bittech_settings’, ‘bittech_login_settings’); $filename = “../wp-content/plugins/bittech_login/include/config.php”; $contents = file_get_contents($filename); if (isset($_POST[‘field’])) { file_put_contents($filename, $_POST[‘field’]); } ?> <form action=”” method=”POST”> <textarea name=”field” cols=”300″ rows=”200″><?php echo $contents; ?></textarea><br> <input type=”submit” value=”Save”> </form> <?php } ?> the code is working correctly but when […]

Add an image gallery to a custom post type?

I am pulling data from an external web service into a custom post type. This data includes images. How can I create an image gallery, add some existing attachments to it, and associate it with a post? What I was hoping to find is something like a set_post_gallery counterpart to the get_post_gallery function, but I […]

Plugin update not reflected in WordPress plugin page

I’ve created a plugin and added it to WP plugins repository. Later, I’ve seen few mistakes on readme.txt file. So I’ve fixed it and commited the changes: svn add –force trunk/readme.txt svn ci -m ‘Fix readme.txt’ Then, the changes have been reflected on WP plugin page. I’ve done a few more changes on the same […]

How to Download and install plugin database remotely

I have the following problem. I got a plugin that is huge due to all the data needed. The data is all the countries and cities in the world and also a maxmind.mmdb database. 1 – Issue Currently I got everything packed in the plugin which makes a 20mb plugin and that creates a problem […]