Images uploading from media going in wrong folder
The date of the folder corresponds to the date the post was created as opposed to the date the media is uploaded.
The date of the folder corresponds to the date the post was created as opposed to the date the media is uploaded.
Turns out the plugin I was using to lazy-load was broken so disabling that made it work!
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.
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
There are plugins that could be used to achieve this. To do it manually add the following code to your theme’s function.php // Check if URL is image function url_is_image( $url ) { if ( ! filter_var( $url, FILTER_VALIDATE_URL ) ) { return FALSE; } $ext = array( ‘jpeg’, ‘jpg’, ‘gif’, ‘png’ ); $info = … Read more
I would use the Google Tag Manager firing options: Or Old school jQuery solution: function($){ $(‘.widget_class’).click(function() { ga(‘send’, ‘event’, ‘Sidebar Image’, ‘Promo Image’, ‘Clicked’); }); })(jQuery); Now you just add a class name to your links.
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
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; ?>
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
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