How can I make an image full width inside a paragraph which is 70% (text) [closed]

Solved, JS with jQuery width(), removeAttr() to avoid wordpress inline width and height. Also negative margins. var anchoArticulo = $(‘article.single-post’).width(); $(‘article.single-post div.single-post img.ancho_completo’) .removeAttr(‘width height’) .css(‘margin-left’ , -(winWidth – anchoArticulo)/2) .css(‘width’ , winWidth); Class ancho_completo is added in dashboard to the image.

Force default OG:Image – Yoast SEO [closed]

The action that allows an OG image to be added seemed to be the thing I was looking for, so much for proper documentation on their side. But now the only thing I’m wondering if the following code I made up is the proper way to deal with it: $default_opengraph=”https://www.rafaeldejongh.com/wp-content/uploads/2017/08/RafaelDeJongh-Web-Developer-3D-Artist.jpg”; function add_default_opengraph($object){global $default_opengraph; $object->add_image($default_opengraph);} add_action(‘wpseo_add_opengraph_images’,’add_default_opengraph’); … Read more

How to change the catalog product image size by product id?

You can use the single_product_archive_thumbnail_size filter to change which image size is used for a particular product: function wpse_287488_product_thumbnail_size( $size ) { global $product; if ( $product->get_id() === 123 ) { $size=”medium”; } return $size; } add_filter( ‘single_product_archive_thumbnail_size’, ‘wpse_287488_product_thumbnail_size’ ); Just replace medium with the registered image size you want to use. See this codex … Read more

Display attached images as background-image css

using this code <?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); ?> <div class=”single-parallax-image” style=”background-image:url(“<?=$image[0]; ?>”)”><?=get_the_content()?></div> </div> <?php endif; ?>

Alt text not showing up

Your caption shortcode seems to be missing the most important part: the image. The caption shortcode in WordPress usually looks like this: There you can see the alt attribute, which is automatically set when you enter the alt text after uploading an image (here: “Kanagawa”). The alt text is not visible to users, but to … Read more

Hide Featured Image box – isn’t working?

The context or the 3rd parameter of remove_meta_box() function for tags meta box and featured image meta box is side. And perfect hook to remove meta box is add_meta_boxes. So try the following code, hope it’ll work as expected. function my_remove_meta_boxes() { if ( ! current_user_can( ‘administrator’ ) ) { remove_meta_box( ‘tagsdiv-post_tag’, ‘post’, ‘side’ ); … Read more