Create search form in menu as in Twenty Fourteen theme

.animate() is the jQuery function you’re going to want to have a look at. Very handy. Here’s a working example for your particular question: http://jsfiddle.net/B8Yv9/ And a complete html workup: <!doctype html> <html> <head> <meta charset=”utf-8″> <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script> <style> .search { width:300px; } .input-group { position:relative; float:right; } #btn-search { cursor:pointer; position:absolute; padding:3px 8px; … Read more

Add js into a theme [closed]

Your code should look like this function my_scripts_styles() { wp_register_script(‘easing’, get_template_directory_uri() . ‘/js/easing.js’, ‘2014-12-030’, true ); wp_enqueue_script(‘easing’); } add_action( ‘wp_enqueue_scripts’, ‘my_scripts_styles’ ); The above code should work fine. Also don’t forget to check if you have properly specified the path to your js file. Check well that you have a functions.php and not function.php file. … Read more

Parallax WordPress theme without hardcoding – possible?

One option would be to load all items in the nav menu into the page when it is being generated using wp_get_nav_menu_items( $menu_name, $args ) Another possible way to do that would be to use ajax to grab the page in question and append it to the end of the current content before the scroll … Read more

How to Know if a Plugin can be used with my Theme [closed]

So in theory WordPress extensions are all using its APIs to peacefully and happily coexist. In practice the landscape of WordPress extensions is a brutal mess, with literally tens of thousands of them, produced by developers of drastically different qualification. The two basic practices to mitigate and save your sanity: If you are in a … Read more

WordPress post arrangement using post_class

It just take a little bit more complicated logic: function alternating_post_class($classes) { static $counter = 1; switch ($counter) { case 1: $classes[] = ‘full-width’; break; case 2: case 3; $classes[] = ‘half-width’; break; } $counter = ($counter == 3) ? 1 : $counter + 1; return $classes; } add_filter(‘post_class’, ‘alternating_post_class’);