Jquery ajax as well as html 5 validations are one of the most important features of web development. Both of them makes the tasks of developers so damn easy. Some of you might ran into issues while using both of them simultaneously , especially with jquery click for triggering the form(the validation may freak out if we use click). Actually the solution is simple, we just need to use the jquery submit so that the ajax will get triggered only after successful form validation. The form gets submitted via ajax to contact.php and success and errors are handled inside the jquery ajax. The form is set up in html 5, and the validations will be in action on form submit.
The $wp_query->current_post inside the wordpress will help you to fix this issues. It will get the count of the current loop executed in the wordpress. And if the loop (post) is the 4th one , we can block the script from being run.
current_post < 3) : ?>
Remember that the wordpress loop count start with zero, you can limit the number of ad units displayed to 1 or 2 by changing the $wp_query->current_post < 3 as per you wish
Video advertisment are now the most trendy method to promote your product. Doesnt have any idea about creating and ad for your product? How can you create a unique video ad that can attract customers? This article will help you.
First of all you should identify the character of your product and make the advertisment for the peculiar product behavior.
Video ads can be of three types
Type 1 (Video ad have zero relation with the product )
In this type, the ad content doesn’t have much(or zero) relation to the product. The best example is Krack and Jack of
the advertisement of the KrackJack biscuits. Krack and Jack does something funny and the whole 1 min ad is about hilarious or funny adventures of both of them.So what did work for the product ultimately?
What worked was that, the producers gave life to the biscuit KrackJack through the characters Krack and Jack. People did switch on their tv to watch their ads alone. It was that funny. And when the ad ends, they just show the product (biscuits) in a glance. Have a look at this old KrackJack ad
Type 2 (Ad do have a relation to the Product, but the ad is illogical and funny)
In this type, the advertisement has true relation to the product. But rather than focusing on the pros of the product, it makes the audience think. The ad may be illogical,but in the end it makes the viewer think about the possibility. Fevicol is the best example of such kind of such kind of ads. Have you seen the fevicol hen ad? The egg hatched by the hen doesn’t breaks (Its even hammered). This part of the ad creates curiosity in the mind of audience as no one haven’t ever heard about such and unbreakable egg. In the end we can see that the hen was having its food in an old fevicol gum tin( and that’s why its eggs didn’t break).
If you think about this ad, you can easily figure out that its illogical, but the idea was interesting right? And that lead to the success of the advertisement.
Why did fevicol go for that illogical idea?
If you think closer you can figure out the reason. Unlike Iphone 5 which do have lots of features and functionalities (I’ve mentioned this in type 3) fevicol doesnt have something to project except its quality and strength. Lets take the example of the iphone ad,they need to explain about all their key features like( display, speed, camera so and so) in a limited time. No one cares about the color or look of a gum, so in the end of the day fevicol only
need to show how strong their gum is. Even though illogical, the hen ad does this purpose perfectly. So when it comes to products like gums, its all about branding it. The most popular and branded product wins the game.
Another good example is the Axe advertisement. The interesting part when working with these kind of ads is that the imagination limit is the sky. Do you think all the ladies will come after you,just because of using AXE? The ad is not practical in that sense, but the impacts made by these kinds of ads are really high.
The Axe Effect Ad
Type 3 (Exploring the features and pros of the product).
Type 3 ads focus on the features and fuctionalities of the product. Lets continue with the iphone example above, does that illogical stuff work for it? NO! No one buys a phone if it doesn’t have the required features and functionalities. Of course, brand value factor is very high of these kinds of products too . But no one can survive in type 3 products without its features(New and different).
Here are some of the products which fall into this category.
1. Phones and Gadgets
3. Television, Fridge etc
Type 4 (Visually Stunning).
The Levis ad , man who walks across America is the best example of visually stunning ads. Apart from the other types which focus on content, this type will be stressing on visual beauty. This Levis ad was one of the most viral video ads becuase of its visual creativity. A man walks all over America and all the whole video was limited to 1.5 minutes (which was a great achievement). No one can bounce out from the ad that quickly, once started viewing
The sort function in array sorts the array very well, but it doesnt maintain the keys so that it becomes really painful sometimes. There will be several scenarios were we need to keep the keys of the associative arrays.
Luckily there are two functions in php which will help us to achieve this
uasort sort the array in the desired order (ascending or descending and will maintain the keys). It accepts two arguments,
1. The array to be sorted
2. The compare function
asort sorts the array and maintains its key. The sorting will only be in ascending order (from smallest to largest). We may need to reverse the array in order to sort it in the descending order. For that we can use the array_reverse function in php