Support » Theme: Cubic » Resizing Built in Gallery

  • Resolved sandro

    (@sandrodotxyz)


    Hello!

    I am currently using the Cubic theme and, from reading other posts on this forum, figured out how to change the content area for single pages using this code as posted here

    body.single .entry-author, body.single .entry-content, body.single .entry-footer, body.single .entry-header {
        max-width: 1000px;
        width: 100%;
    }
    .wp-caption.caption-big, .image-big {
        margin-left: -72px;
        max-width: 1000px;
        width: 100%;
    }

    the issue is that, while this resizes the content area perfectly, when using a WordPress Gallery, the gallery is not re sizing to use the full space available. It just moves left on the page but stays the same width. Is there any additional CSS code I can add to this solution so that the Gallery will also be resized?

    I am specifically using the Gallery Setting type Square Tiled and Tiles Mosaic.

    Thank you in advance for any help you can offer!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Could you provide a link to a page or post with a gallery on your site so folks can take a look directly? Thanks.

    sandro

    (@sandrodotxyz)

    The link to the post is here

    I did find a workaround by going into the the ‘functions.php’ of the parent theme ‘Boardwalk’ and editing the line

    /**
     * Set the content width based on the theme's design and stylesheet.
     */
    if ( ! isset( $content_width ) ) {
    	$content_width = 1240; /* pixels */
    }

    to

    /**
     * Set the content width based on the theme's design and stylesheet.
     */
    if ( ! isset( $content_width ) ) {
    	$content_width = 768; /* pixels */
    }

    and then changing the CSS for the page to

    .entry-content{
      max-width: 1240px;
      width: 100%;
    }

    I took out the implementation of changing the ‘functions.php’ and left the CSS change to highlight the issue. I was hoping there would be a way to fix this issue without changing the ‘functions.php’ because I know that will likely reset every time the theme is updated.

    Thank you,
    -sandro

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Hi Sandro, the usual way to make this change without editing the theme itself is by creating a child theme and placing the code in the child theme’s functions.php. But since Cubic is already a child theme of Boardwalk, it’s not possible to go that route.

    You could try the “grandchild theme plugin” method if you like — it’s not officially supported, but feel free to give it a try. Here’s a tutorial to point you in the right direction:

    Creating Grandchild Themes

    sandro

    (@sandrodotxyz)

    Thank you! I guess at that point it may just be easier to modify the parent theme considering all I’m changing is one number so even if it does update it wouldn’t be a huge hassle to change again.

    Thank you for the help!

    -sandro

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Resizing Built in Gallery’ is closed to new replies.