Remove inline width from figure

I add an image with caption to my page and need to increase <figure> width. But wordpress is adding an inline width. So, the DOM look like this: <figure id= »attachment_43″ aria-labelledby= »figcaption_attachment_43″ class= »wp-caption alignnone » style= »width: 216px »> <a href= » »> <img src= »http://localhost/bordados/website/wp-content/uploads/2014/02/homeThumb01.jpg » alt= »Caption » width= »216″ height= »95″ class= »size-full wp-image-43″> </a> <figcaption id= »figcaption_attachment_43″ class= »wp-caption-text »>Caption.</figcaption> </figure> I try to remove width= »216″ from code, but the caption desappear. How I remove this inline style? Source: https://wordpress.stackexchange.com/feeds

Web Design Weekly #127

Headlines Bye Bye Layer Hacks, Hello will-change Have you ever used the translateZ hack to create a new compositor layer? Most developers have. Now there is an incoming property called ‘will-change’ that’s going to change how we tell the browser what we’re trying to achieve. (aerotwist.com) Mobile Menu AB Tested: Hamburger Not the Best Choice? (exisweb.net) Learn how to use WordPress in one hour without reading a word Whether you’re new to WordPress yourself, or are looking for a better way to teach your clients how to work with WordPress,…

How to add menu support to a theme?

I tried few tutorials. All i think is i should use register_nav_menus() and then add the menu in header.php Here is the code i tried in functions.php from this help site itself function my_cool_menu_function(){ register_nav_menus( array( ‘primary’ => ‘Primary Navigation’ )); } add_action( ‘after_setup_theme’, ‘my_cool_menu_function’ ); In header.php <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?> When i tried to check whether any menu is registered with this function $locations = get_nav_menu_locations();var_dump($locations); I got array of size zero. i,e no menu registered. Am i missing something? I can able…

custom gallery filter with image caption as link title?

I use a custom gallery function to alter the normal WordPress markup. Usually it’s fine but I can’t quite figure out how to add the image caption as a TITLE attribute on the thumbnail link. (The lightbox I’m using turns the title attribute into a caption.) Here’s the relevant code from the filter: foreach ( $attachments as $id => $attachment ) { $link = isset($attr[‘link’]) && ‘file’ == $attr[‘link’] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); $link = str_replace(‘><img’,’title= »test caption » ><img’,$link); $output .= « <{$itemtag} class=’item’> »; $output .=…

Why are simple updates to wp_postmeta’s "_edit_lock" so slow?

In our MySQL slow query log, the cumulatively slowest query is a simple update to wp_postmeta. Here’s an example: UPDATE `wp_postmeta` SET `meta_value` = ‘1392835505:386’ WHERE `post_id` = 94705 AND `meta_key` = ‘_edit_lock’; Relevant details on our setup: MySQL slow query time set to 1s wp_postmeta’s storage engine is InnoDB Running within a large Multisite installation with tens of thousands of posts on the main WP blog (where these slow queries are occurring) High activity in the WP admin area (lots of writers/editors working concurrently, but generally on their own…

Web Design Weekly #126

Headlines Making the Envato Marketplaces Responsive A great post by Jordan Lewis about some solutions they have developed to progressively convert the Marketplaces to be responsive in the near future.(envato.com) Massive Discounts on Stock Photos Stock images are expensive and that’s why we have a special deal: download up to 100 images of any size for just $99, any time over 1 year with no daily limit. Get 200 images for $160. See the deal. (mightydeals.com) Articles UI Animation and UX: A Not-So-Secret Friendship Animation on the web has hit…

Un menu horizontal « full largeur » en CSS

Après le menu vertical, voici maintenant un menu horizontal en full largeur sur 2 niveaux. Celui-ci s’adapte automatiquement suivant la largeur de votre écran, cependant il faudrait pour un mobile adapter celui-ci en le passant verticalement. Petite note, dans l’exemple il y a 4 liens de menus, pour en mettre plus ou moins il faut… Source: https://www.djwebcreator.fr/feed/

Pagination 404 Not Found child page

I have a page Heemtijdinghen displaying custom posts (post_type=artikel) paginated. The page is a child page of page Publicaties: /publicaties/heemtijdinghen/ When navigating to e.g. page 2 a 404 Not Found is thrown: /publicaties/heemtijdinghen/page/2/ => 404 Not Found However, pagination does work correctly when I make the child page a parent page: /heemtijdinghen/page/2/ => OK I have no clue how to do the rewrite: add_filter(‘init’, ‘plugin_name_add_rewrite_rules’); function plugin_name_add_rewrite_rules() { add_rewrite_rule(‘publicaties/heemtijdinghen/(.?.+?)(/[0-9]+)?/?$’, ‘index.php?post_type=artikel’, ‘top’); add_rewrite_rule(‘publicaties/heemtijdinghen/([^/]+)(/[0-9]+)?/?$’, ‘index.php?post_type=artikel&paged=$matches[1]’, ‘top’); } Help would be very much appreciated. Source: https://wordpress.stackexchange.com/feeds

Web Design Weekly #125

Headlines Optimising Web Font Rendering Performance Just because the page is using a web font, or several, doesn’t mean it will (or has to) render slower. A well optimised site can deliver a better and faster experience by using web fonts. In this article Ilya Grigorik explains how. (igvita.com) The Design Kickstarter Bundle (400+ items) Full of more than 400 different pieces, you’ll get loads of new textures, Photoshop brushes, vector elements, swoosh typefaces, Photoshop action sets, and more! Best of all, this giant bundle won’t break the bank! That’s…