How to disable Embeds in WordPress with code?

Posted by Prem Tiwari | Updated on | WordPress


If you want to disable Embeds in WordPress with code You can also just disable embeds with code. Simply add the following to your WordPress theme’s functions.php file.

How to display only first level child subcategory in WordPress?

Posted by Prem Tiwari | Updated on | WordPress


Want to display only first level child subcategory in WordPress? I have added this snippets which one is fully tested from my side and also used this in my project and it is working fine …

How to list child categories in custom category template?

Posted by Prem Tiwari | Updated on | WordPress


If you want to list child categories in custom category template? This piece of code will return you the child categories of a parent. Just pass the category id to $cat_id variable which children you …

How to animate list changes in flutter?

Posted by Prem Tiwari | Updated on | Flutter


Want to animate list changes in flutter? I assume you are trying to implement the swipe feature in your list. There is a gesture named Dissmisable

How to create infinite list with Cloud Firestore in flutter?

Posted by Prem Tiwari | Updated on | Flutter


Want to create infinite list with Cloud Firestore in flutter? I am not sure whether it is possible or not with Streambuilder. I have integrated the similar functionality in my App using the startAfter method …

How to write a double back button pressed to exit app using flutter

Posted by Prem Tiwari | Updated on | in Flutter. Updated on


In this example, we will learn how to write a double back button pressed to exit app using flutter This is an example of my code (I’ve used “fluttertoast” for showing toast message, you can …

How to parse JSON in the background in Flutter?

Posted by Prem Tiwari | Updated on | Flutter


Want to parse JSON in the background in Flutter? By default, Dart apps do all of their work on a single thread. In many cases, this model simplifies coding and is fast enough that it …

How to delete all records associated with an ember model without clearing local Storage?

Posted by Prem Tiwari | Updated on | AngularJS


If you want to delete all records associated with an ember model without clearing local Storage? You can do it by calling deleteRecord() within forEach will break the loop. You can fix it by wrapping …

How to update the state from child in ReactJS?

Posted by Prem Tiwari | Updated on | Reactjs


Want to update the state from child in ReactJS? The parent is the source of truth, so the child needs to tell the parent to change its state. Pass a callback from the parent to …

How to pass props on routes to child components by react router?

Posted by Prem Tiwari | Updated on | Reactjs


If you want to pass props on routes to child components by react router? You can’t currently (pre 1.0) do that with React Router. I believe one recommended way is to have wrapper components: Then …

How to add custom validation to an AngularJS form?

Posted by Prem Tiwari | Updated on | AngularJS


How to add custom validation to an AngularJS form? To do custom validation, if you don’t want to use Angular-UI as the other answer suggested, you can simply roll your own validation directive.

How to pass variables between controllers in AngularJS?

Posted by Prem Tiwari | Updated on | AngularJS


Want to pass variables between controllers in AngularJS? One way to share variables across multiple controllers is to create a service and inject it in any controller where you want to use it. Simple service …

How is AngularJS different from jQuery

Posted by Prem Tiwari | Updated on | in Angular JS. Updated on


In this example, we will learn how is AngularJS different from jQuery. jQuery and AngularJS have some common features like Unit test runner, animation support, AJAX/JSONP but they also have some differences. Below is a …

How to get the path to the current template in Joomla 1.5?

Posted by Prem Tiwari | Updated on | Joomla


Want to get the path to the current template in Joomla 1.5? IIRC, the $mainframe global object is eventually going away. Here is a way to do it through the framework:

How to load wordpress child theme css after parent theme css?

Posted by Prem Tiwari | Updated on | WordPress


If you want to load wordpress child theme css after parent theme cssAdd the priority. Here 99 is high, so it will likely be last but some plugins may add css at a higher priority, …