Using FlexNav with WordPress [closed]

You don’t need a custom walker function. You can alter wp_nav_menu like this: wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘flexnav’, //Adding the class for FlexNav ‘items_wrap’ => ‘<ul data-breakpoint=”800″ id=”%1$s” class=”%2$s”>%3$s</ul>’, // Adding data-breakpoint for FlexNav )); and proper script init should be: jQuery(document).ready(function($){ $(“.flexnav”).flexNav({ }); }); Drop menu button somewhere outside navigation: <div … Read more

Implementing Zurb’s Interchange Into WordPress

If you haven’t already enabled thumbnails in your theme, add this snippit to your functions.php: add_theme_support(‘post-thumbnails’); Then add this code. add_image_size( ‘responsive-small’, 300, 500 ); add_image_size( ‘responsive-large’, 768, 500 ); Here’s how it works: function( ‘unique_identifier’, width, height); Now the fun part. To use this in your template: <?php if ( have_posts() ) : while … Read more

Responsive Images

To add to the answer from @cristian.raiber, there is no function in WordPress or php to detect screen sizes, and there will in all probabilty never be such functionality. Php runs server side, which runs before clients side which is browser side. As for php, and for that matter WordPress, I cannot see any future … Read more

Pb with responsive image sizes in WP 4.4

I handle the context like this: function wpse_216001_srcset() { // generate your Srcset here and return } function wpse_216001_sizes() { // generate your sizes attribute here and return } add_filter( ‘wp_calculate_image_sizes’, ‘wpse_216001_sizes’, 10 , 2 ); add_filter( ‘wp_calculate_image_srcset’, ‘wpse_216001_srcset’, 10 , 5); // call one of the standard WP image output functions here remove_filter( ‘wp_calculate_image_sizes’, … Read more

How-to add rewrite rules to point the uploads folder to a subdomain

If you are not willing to filter only image uploads, i.e., all uploaded media will reside in the same folder/subdomain, then there’s a simple configuration solution: go to options-media.php set the Store uploads option to wp-content/uploads set the Full URL option to http://uploads.yourdomain.com create a subdomain making the uploads folder be http://uploads.yourdomain.com