Customise the WordPress gallery html layout

I find a solution for this: // Customise the WordPress gallery html layout add_filter(‘post_gallery’,’customFormatGallery’,10,2); function customFormatGallery($string,$attr){ $output = “<div class=\”mihan-gallery\”>”; $posts = get_posts(array(‘include’ => $attr[‘ids’],’post_type’ => ‘attachment’)); foreach($posts as $imagePost){ $output .= “<a class=\”mihangitem\” href=”https://wordpress.stackexchange.com/questions/384853/”.wp_get_attachment_image_src($imagePost->ID,”mihan-large’)[0].”‘><img src=”https://wordpress.stackexchange.com/questions/384853/”.wp_get_attachment_image_src($imagePost->ID,”mihan-medium’)[0].”‘></a>”; } $output .= “<div class=\”clear\”></div></div>”; return $output; }

Redirect User Role When on Specific Page

You can achieve your goal this way: // Block Access to /wp-admin function mwd_redirect_if_on_page() { if ( is_user_logged_in() && is_admin() && current_user_can( ‘contributor’ ) && (defined( ‘DOING_AJAX’ ) && !DOING_AJAX) ) ) { wp_redirect( home_url(‘specific-page’) ); exit; } } add_action( ‘init’, ‘mwd_redirect_if_on_page’ ); If you carefully see I’ve added ajax check. This way contributor won’t … Read more

Add custom css file after plugin css with WordPress Child Theme functions.php

The original stylesheet is enqueued as openpos.bill.bootstrap wp_enqueue_style(‘openpos.bill.bootstrap’, OPENPOS_URL.’/assets/css/bootstrap.css’) // load my custom css after this one But you’ve set openpos.bill.style as the dependency: wp_enqueue_style(‘bill-screen-style’, get_stylesheet_directory_uri() . ‘/include-parts-from-functions-php-file/frontend-related/plugins/openpos-plugin/pos-app/css/bill-screen-style.css’,array(‘openpos.bill.style’)); These need to be the same.

Overwrite text in a complicated filter hook

It’s easier to understand if you break it down. The code in your question is exactly the the same as this: $message = sprintf( __( ‘This action will let you pay a deposit of <span class=”deposit-price”>%s</span> for this product’, ‘yith-woocommerce-deposits-and-down-payments’ ), wc_price( $deposit_value ) ); $message = apply_filters( ‘yith_wcdp_deposit_only_message’, $message, $deposit_value ); echo wp_kses_post( $message … Read more