Back to the top
Ticket #2061 in : Unsolved

Override Gallery to use Standard WP Gallery?

  • Ryan McQueen

    How would I go about inserting a standard WordPress gallery into a Page, rather than using the Northern Gentleman gallery style? I’m using the child theme, and I’m comfortable editing theme/template files, I just don’t know which files to edit and what needs to be edited.

    Thanks!

    Posted 5 years ago
  • Gareth Gillman Staff

    Hi Ryan

    you just need to edit the CSS which is spitted out from the shortcode, Mark / T31os post explains how to do it, remove the styling using a function at the bottom of the functions.php and then adding your own css code (put it in norther > css)

    The link is https://wordpress.org/support/topic/styling-the-native-gallery

    Regards

    Posted 5 years ago
  • Ryan McQueen

    Thanks for the quick response! I guess I’m not sure what the custom function that I need to replace is. If I add the following to the bottom of functions.php in my child theme, what would I replace ‘wolf_custom_function’ with?

    if ( ! functions_exists( ‘wolf_custom_function’ ) ) :

    function remove_gallery_css( $css ) {

    return preg_replace( “#<style type=’text/css’>(.*?)</style>#s”, ”, $css );

    }

    add_filter( ‘gallery_style’, ‘remove_gallery_css’ );

    endif;

    Posted 5 years ago
  • Gareth Gillman Staff

    Hi Ryan

    you would then add your own custom CSS to style the gallery, you would add this to the CSS tab under northern gentleman

    Regards

    Posted 5 years ago
  • Constantin Saguin Author

    Hi,

    Unfortunately, we can’t help you on this one.

    If you want customizations that are not available in the theme options, feel free contact my partner to get a quote.

    https://help.wolfthemes.com/customization/ for complete customization or

    https://www.elto.com/?invite=wpwolf for small tweaks

    this can also help if you need small customization

    http://wpwlf.co/QVFMvJ

    Cheers

    Posted 5 years ago