Tektriks

Coding starts here
Home / Blog

How to add PHP Debug Bar in WordPress?

As a WordPress developer, sometimes you use echo, var_dump, print or print_r to know the type and value of a variable in PHP. But this process is very slow as it takes 4 steps to retrieve the result. Download a file from your remote server. Type echo or any in your code and save your […]

How to create multiselect dropdown in WordPress Theme Customizer

Post WordPress 4 versions added superior support to manage your theme from backend. Today I am discussing on the ‘customize_register‘ action hook where you can set up various settings in your personalized or custom theme. You can add various controls like Textbox, Textarea, Radio, Checkbox, Selectbox, Image, File, Color picker etc. For more information you […]

Customize or Branding WordPress Login Page

Sometimes when you are developing a site using WordPress, you have to white labeling or branding your admin section as per client requirement. Here comes the first page is login page. When you visit a default login page in WordPress, you might come across this view: Now, you can change the theme of your login […]

How to get WordPress Categories and Subcategories as a multi-dimentional array

WordPress has improved much more after integrating REST Api in their CMS. This gives us much more flexibility for building mobile applications. Though currently it is providing some basic functions but you can extend its functionality in any directions. If you are working with web services where your back-end is running on WordPress, then you […]

How to add home & logout link in wp_nav_menu in WordPress

function addHomeMenuLink($menuItems, $args) { if(‘main’ == $args->theme_location) { if ( is_front_page() ) $class = ‘class=”current-menu-item”‘; else $class = ”; $homeMenuItem = ‘<li ‘ . $class . ‘>’ . $args->before . ‘<a href=”‘ . home_url( ‘/’ ) . ‘” title=”Home”>’ . $args->link_before . ‘Home’ . $args->link_after . ‘</a>’ . $args->after . ‘</li>’; $loginoutlink = wp_loginout( home_url(), […]

How to create WordPress user using latest Facebook PHP SDK

There are many plugins available for WordPress to integrate login with social networking sites. Some of them are very handy as non-technical person can install and manage those following their simple instructions. But many of them comes with their in-built buttons or images as a group of login links. For many developers, it becomes nightmare […]

Share Users and Session with Different WordPress Installations

Sometimes you have two different websites powered by WordPress running on your server, one for your main features and other is for blogging. Main website has some users but you do not want the same users to register again for your blog also. When the user will login your website, it will automatically be logged […]

Add Custom Dashboard Widget in WordPress

This code will display a custom dashboard widget in wordpress admin.

tektriks logo