SQL query to remove first image in all posts
SQL query to remove first image in all posts
SQL query to remove first image in all posts
page displaying media caption shortcodes
if you can do it easy way ,so why not? you can use jquery to do it like: ( function( $ ) { function function_name() { $( ‘.gallery-caption’).css({display:’none’}); } function_name(); } )( jQuery );
I solved this by ripping out all the css for sectio 5.4 Galleries (anything under .galleries) and slapping in the code from the twenty ten theme. Needed a bit of tweaking, but they are now showing properly.
Did a bit more digging and it appears to have been a conflict in my theme: add_filter( ‘post_thumbnail_html’, ‘remove_width_attribute’, 10 ); add_filter( ‘image_send_to_editor’, ‘remove_width_attribute’, 10 ); function remove_width_attribute( $html ) { $html = preg_replace( ‘/(width|height)=”\d*”\s/’, “”, $html ); return $html; }
This works: add_filter( ‘disable_captions’, create_function(‘$a’, ‘return true;’) ); function image_send_to_editor_2($html, $id, $caption, $title, $align, $url, $size, $alt) { $width=”auto”; if ( preg_match( ‘/width=”([0-9]+)/’, $html, $matches ) ) { $width = $matches[1] . ‘px’; } $output=”<div id=”attachment-” . $id . ‘” class=”wp-caption align’ . $align . ‘” style=”width: ‘ . $width . ‘;”>’; $output .= $html; … Read more
Ended up with the very low-tech, but functional, fix of adding<p> in place of an html paragraph tag. Worked like a charm.
Go to woocommerce folder-> template single product -> product-thumbnail.php from that you need to delete the slider class
<figure> <?php echo get_the_post_thumbnail( null, $size, $attr ); ?> <figcaption>here goes your caption</figcaption> </figure> for the_post_thumbnail check : https://developer.wordpress.org/reference/functions/the_post_thumbnail/
A WordPress approach If you have all your Images in the media gallery, you are able to access their post object while embedding/including the images via tinyMCE or plain PHP. WordPress uses wp_prepare_attachment_for_js to get all information about their images for their blade templates. Maybe this will help you to get started. A maybe approach … Read more