Ok! So you need to pass variables to get_template_part() in WordPress. Sorry because get_template_part() is not made to accept variables or arguments. But here is a better way to achieve the same using WordPress’s locate_template() function within PHP’s include().
Category » Trending Posts
5 star rating in PHP with AJAX and jQuery
Displaying a star ranking system is a common requirement to implement in websites. We have explained here how can we show a group of stars for each database record and dynamically apply 5 star rating in PHP with AJAX and jQuery. You can make AJAX calls to store rating of the record in database.
WordPress AJAX login in sidebar without a plugin – Part II (AJAX logout)
In the previous part of this tutorial we covered technique to implement AJAX login in sidebar without a plugin in WordPress. In this part two we will continue with AJAX logout.
After a successful login, login form gets disappear and AJAX loads user’s display name and a link to logout on the same page. Now we need to apply some functionality to show the same and keeping the login form hidden on page refresh or redirect.
Only variables should be passed by reference
Sometime we face a unique type of problem during development and we watch the code thoroughly but not find the error where we are getting. ‘Only variables should be passed by reference‘ in $file_extension = end(explode(‘.’, $file_name)) is the same type of problem which does not seem as error in our code and it happens in usual code.
Responsive Best Free WordPress Themes | Nov 2014
This article has collection of selected Responsive Best Free WordPress Themes which I already tested and used in client projects as well. These themes are not only amazing and beautiful but also are free to download and use as well as they don’t have any lite/pro version concern. Grab a coffee or tea and start bookmarking your favorites.
10 Secret Things to Know Before Buying Web Hosting
You have found a web hosting plan offering everything unlimited and are purchasing now. Wait! Don’t get trapped. There are at least 10 secret things you must know and check before buying web hosting. No web hosting company would like to disclose them before you.
site_url() and base_url() in CodeIgniter, Difference and when to Use
site_url() and base_url(), both are useful functions in CodeIgniter. However, developers get confused about what is the difference between them and when to use site_url() or base_url(). In this article, we’re explaining both and use scenarios.
Setting up Foreign Key in phpMyAdmin
Setting up foreign key in phpMyAdmin is quite easy. With help of this step by step pictured tutorial, you will be able to set foreign keys within your tables.
Here in the example we have three tables. ‘products’, ‘category’ and ‘product_category’. You can see structures of these tables in the picture below:
jQuery UI sliders on touch devices
I was using jQuery UI range slider and it was working on desktop very well but my website was responsive and working very well on touche devices. But jQuery UI sliders on touch devices appear to be incompatible when viewed on Ipad and Iphone. So I googled on this issue and found a solution which am explaining here
How to speed up page rendering
In website, speed up page rendering is very important factor. Because if our page speed is fast then visitors can visit more pages on our site and can take a glance easily. We have to make our web pages fast but it’s not too easy to optimize web pages at each and every scale.