The set_value(‘field name’) function in codeigniter allows us to retain the value of input field in form during form submission but it’s not applicable to keep checkbox checked if it was checked while the form was submitted or during postback submit refresh. Here to keep checkbox checked after form submit in Codeigniter, the set_checkbox() function plays the role.
There may be a situation when you need to display content based on existence of a page or custom post by url. As the example below there are two different parent pages for the same page slug. We assume that certain pages will have the same title, and just have different parent pages. So we want to check if a page exists by url?
PHP provides functions to get the number of days in a month for a specified year and calendar. We can use date(‘t’) or cal_days_in_month. See syntax, parameters and examples in rest of the article.
The old way to create child theme in WordPress is to place a style.css file in your child theme folder and import the parent stylesheet into the child theme. But WordPress documentation stated the use functions.php to create child theme in WordPress and use wp_enqueue_style() to enqueue the parent stylesheet.
Many developers confused with the Attr and Prop keyword in jQuery. So We are describing here the difference between Attr and Prop in jQuery. The segregation of attr() and prop() should help alleviate some of the confusion between HTML attributes and DOM properties.
For jQuery 1.6 or above there is prop() function and lower jQuery versions have attr() function which can be used to disable or enable an input field. Further more DOM object’s disabled property also works with any version of jQuery to disable or enable an input field.
I use wp_signon() and it returns a user, not an error. However when I do is_user_logged_in() it returns false.
I am trying to get current user info by using get_currentuserinfo() and wp_get_current_user()
Sometimes we need to get the last day of the month on specific date in mysql becoz every month has different last day eg. FEB. may have 28 or 29, JAN has 31 and APR has 30.