How to output images as figure/figcaption

add_theme_support( ‘html5’, array( ‘gallery’ ) ); or with another arguments such as search-form, comment-form, comment-list and caption, its call as Theme Markup Added gallery and caption support was introduced since WordPress version 3.9. As of version 3.9 WordPress uses <figure> and <figcaption> elements, instead of the generic definition list markup to output galleries. More on … Read more

Using HTML 5 Details/Summary Tag

WordPress filters the markup used in post content as a security measure. This stops people inserting malicious javascript inside comments or posts. On a non-multisite install, administrators sometimes have the unfiltered html capability allowing them to bypass this, but this is a dangerous feature In particular, the wp_kses_post function replicates this functionality and maintains the … Read more

Layer post title on top of image WordPress featured thumbnail image

the_post_thumbnail() does not return the path of your image. Instead, it returns the complete HTML markup for that image. You can use this instead: $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) ); echo $image[0]; If you want a specific size you can pass an additional parameter: $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); echo $image[0]; … Read more

Add htmlentities and/or shortcode into data-attributes

the_field echoes the output while htmlentities() expects the value to be returned. Try get_field instead: data-img=”<?php echo htmlentities(get_field(‘portfolio_galleries’)); ?>” UPDATE: Instead of adding this huge chunk of html for the slider to the data-attribute just add it after your image: <img src=”https://wordpress.stackexchange.com/questions/93587/<?php echo $large_image ?>” data-title=”<?php echo get_the_title(); ?>” data-description=”<?php the_content();?>” alt=”<?php echo get_the_title(); // … Read more

How to allow html5 tag in WordPress

Just FYI… WordPress 3.2 includes an updated TinyMCE which allows HTML5 tags. It’s still under development but is fairly stable if you want to take the risk of running it now. The alternative is to write any posts requiring the tag with the visual editor turned off. As long as you don’t turn the editor … Read more

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