How to List Only Parent Categories in WordPress

WordPress provides default feature of category archives. We can also create sub-categories of the main category. While listing categories in sidebar via widget it displays all categories including every child category. But what if we want to list only main categories with no other parent category? Find Main or Only Parent Categories in WordPress Here […]

How to Create a New Custom Widget in WordPress

WordPress provides some default widgets to display extra content on the website. However, we can also create custom widgets when required. Every widget has its own unique functionality on the website. Otherwise, there would be no need to create a new widget. Add a New Widget in WordPress WordPress provides some default widgets like categories, […]

How to Create a New Custom Sidebar in WordPress

WordPress provides a single sidebar by default. Even more, WordPress provides custom support to fulfil various requirements with a few lines of code. So, we can easily add or remove new sidebars in WordPress for various purposes. Sidebars are quite helpful and informative for users to easily navigate on a website and to explore helpful […]

How to Echo New Line in PHP

There are several ways to print a new line in PHP. Line break is quite important factor of content formatting and organization. In addition, content management is required for better user experience of the website. Line break helps to make content more readable with proper usage. There are many ways to enter a new line […]

How to Set Onclick Function in PHP

Onclick event is one of the most used events in any user interface. As all events on the website are related to UI, and PHP is a back-end language. So, we can not set direct Onclick event of any PHP function. Wrong Interpretation of Onclick Event in PHP <?php function my_funciton(){ //do something } ?> […]