In WordPress, wp_enqueue_script is a function used to include a stylesheet or script to a page A script can consist of javascript, jquery, or even a customized one In this post, you will find how to add CSS in the header using this function And also, a variable that can include a script in the page footer Furthermore, there are […]
The function admin_url fetches the administrator directory URL The final output when the function is called is a path of directory wp-admin The function offers the ability to access APIs like admin-ajax.php and comment.php In short, there are 7 folders and 99 WordPress PHP files residing in wp-admin In this post, you will find examples that demonstrate how admin_url returns […]
Among the WordPress functions for including javascript files in a page, wp_localize_script does that task Then, if you ask yourself what is wp_localize_script, here is the answer wp_localize_script is the WordPress function special for localizing a script with data to be used by a javascript codes If a template intends to use localization API, it will be required to use […]
This post shows how to search custom post types in WordPress using get_page_by_title. The returned page displays the posts of the selected category. A user will be able to see the related posts on a single page once the post type title is searched. Also, you will find out how to search a custom post type by a posts title […]
In WordPress, there are six basics user capabilities and roles. When the blog has many authors(users) it becomes a challenge to reveal the roles of a user. Although, it is possible to get an author role in a very simple way. WordPress can provide user’s information by a get_userdata function. It is a function that has an object which is […]