How to oEmbed from custom field, responsive to container size and responsive

I completed the task with fitvids.js by using the plugin FitVids for WordPress. Chris Coyier describes the integration with WordPress in his screencast Integrating FitVids.js into WordPress (on YouTube). My custom field name is video_url. I used the following code in my template: <?php if (!((get_post_meta($post->ID, ‘video_url’, TRUE))==”)) { echo wp_oembed_get( get_post_meta($post->ID, “video_url”, true) ); … Read more

How to use the responsive images feature from WP 4.4 in your themes

Following our exchange in the comments I’ve reread your question and have a pretty straightforward answer: It looks like it’s working fine. You are worried about the sizes attribute in your second example, but it’s the srcset attribute that you should look at and it is showing all of your image sizes: <img src=”http://xxx.dev/wp-content/uploads/Delft_IMG_6275-e1453192498922.jpg” class=”attachment-full … Read more

WP 4.4 aspect ratio with responsive image

You shouldn’t. srcset is used for when you want to optimise the quality for different devices by serving different sizes of the same image. If you want to serve different crops, you should be using the picture element instead. For example, if the intention of your image sizes is to serve a ‘small’ version to … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)