Fix Image Caption Rendering Issue Caused by WPResidence Theme

if(!function_exists(‘wp_get_attachment’) ) : function wp_get_attachment( $attachment_id ) { $attachment = get_post($attachment_id); if( $attachment ) { $caption = function_exists(‘aioseoImageSeo’) ? aioseoImageSeo()->tags->replaceTags(aioseo()->options->image->caption->format, $attachment->ID, ‘caption’) : $attachment->post_excerpt; return array( ‘alt’ => get_post_meta($attachment->ID, ‘_wp_attachment_image_alt’, true), ‘caption’ => $caption, ‘description’ => $attachment->post_content, ‘href’ => esc_url(get_permalink($attachment->ID)),…Continue reading

Add post meta if content has WP Tasty

add_filter( ‘tasty_pins_old_attributes_migration_content’, function ( $content, $post ) { if ( str_contains( $content, ‘WP Tasty’ ) ){ update_post_meta( $post->ID, ‘wp-tasty-here’, true ); } // You can also change $content to modify the contents of the post. return $content; }, 10, 2…Continue reading

Show more Landings

document.addEventListener(“DOMContentLoaded”, function () { // Get all Read More buttons const readMoreButtons = document.querySelectorAll(‘.read-more’); readMoreButtons.forEach(button => { button.addEventListener(‘click’, function (event) { event.preventDefault(); const feature = this.closest(‘.feature’); const longDesc = feature.querySelector(‘.long-desc’); const shortDesc = feature.querySelector(‘.short-desc’); if (longDesc.style.display === “none”) { longDesc.style.display…Continue reading

CSS – Ajout de Ninja Tables

/* Ajout de Ninja Tables */ .footable .open>.dropdown-menu { display: block !important; } .footable .dropdown-menu{ display: none !important; } .container { overflow: initial !important; } .post-page-numbers { border: 1px solid rgb(0 0 0); padding: 5px 10px; border-radius: 5px; }Continue reading

CSS – listes

@property –nat-li-icon { syntax: ““; inherits: false; initial-value: disc; } @property –nat-bgcolor { syntax: ““; inherits: false; initial-value: white; } @property –nat-color { syntax: ““; inherits: false; initial-value: black; } /* Pour les listes */ .nat-li-tkome {–nat-li-icon:”※ “;} .nat-li-tnote {–nat-li-icon:”Note…Continue reading

css – Pour les images

/* Formattage des images */ img.natha { vertical-align: baseline;} .nath-text-top { vertical-align: text-top; } .nath-align-text-bottom { vertical-align: text-bottom; } .nath-align-sub { vertical-align: sub; } .nath-align-super { vertical-align: super; } .nath-size-square-50px { height : 50px; } .nath-img120par80 { height: 120px; width:…Continue reading