Category: WordPress Development

  • Create WordPress User with Admin Privileges in MySQL

    INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES (‘admin’, MD5(‘password’), ‘User Admin’, ‘user@admin.com’, ‘0’); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), ‘wp_user_level’, ’10’);

  • Swipebox Plugin for WordPress

    Recently I was looking for a nice “lightbox” type jQuery plugin that will have swipe gestures for mobile devices.  I came across Swipebox.  I liked this jQuery plugin and decided to make my own WordPress plugin for it.  In this article I will outline main steps of its creation.  You can find complete plugin at…

  • Contact Form Processing with PHP, MySQL, and Swift Mailer

    In this article we will take a look how to process a contact form on your web page. We will collect the data from input fields, server side validate it by checking if fields are empty, put website user’s message in the database, and send a notification email to the website owner.

  • WordPress Errors and Solutions

    Infinite redirect loop If there is infinite redirect loop, put this line in functions.php of current theme. remove_filter(‘template_redirect’, ‘redirect_canonical’); WordPress asks for FTP credentials Change ownership of your WordPress directory. chown –R www-data:www-data Nginx: 413 Request Entity Too Large Error Change Nginx config file sudo nano /etc/nginx/nginx.conf # set client body size to 128M #…

  • WordPress: Building Kage Child Theme – Adding Bootstrap Carousel

    Unfortunately, Kage WordPress theme does not come with a slider, or some kinda carousel.  An easy solution is to place a bootstrap carousel instead of the front image. To do so we first of all need to enqueue bootstrap.  Below is the code you can put in functions.php  function kage_child_enqueue_scripts(){ wp_enqueue_script( ‘bootstrap-js’, ‘https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js’, array(‘jquery’), ‘3.3.7’,…

  • Adding Schema Markup to WordPress Blog

    So, you’ve decided to boost your website’s SEO by adding schema markup?  Here is a great article on how to do it https://blog.kissmetrics.com/get-started-using-schema/ After spending some time marking up your post, you may find that your schema markup tags were stripped by TinyMCE editor that is used by WordPress.  In order to solve this problem you need to…

  • WordPress: Building Kage Child Theme – Creating Social Media Icons

    I like Kage WordPress theme https://wordpress.org/themes/kage/ It is minimal, fast, and elegant.  Premium Kage theme has a lot more features than the free one, but sometimes you do not need all extra code when you use only one or two features like a slider or a social menu icons.  Let’s take a look at how to add…

  • Fixing Menu Issue on WordPress Single-Page Themes

    Among WordPress themes out there, there are so called single- or one-page themes.  Most of the content of the page is located on one page.  Menu links are route to different sections of the page via anchors tags.  The menu is created using custom anchor links like so: The corresponding  part of an anchor tag…

  • Adding Links To WordPress Admin Toolbar

    Recently I was surprised to discover that the HKN (Honor Society for Electrical and Computer Engineers) website I designed in WordPress was still up and running (www.ecs.csun.edu/hkn).  Back in the days I also created a couple of youtube video tutorials on how to use the website. It is a good idea to create a link…

  • Adding MailChimp Popup Signup Form to Your WordPress Website

    MailChimp email marketing service now gives you an option of creating popup signup form that can be embedded on any website.  When all set and done, MailChimp provides you with the following code: You can just copy and paste this code into header.php or better yet in footer.php because you want the signup form to popup when the…