Home › Forums › Weaver Xtreme Theme › Trying to locate specific page selectors to switch to 2 column from 3 column
- This topic has 8 replies, 3 voices, and was last updated 8 months, 3 weeks ago by
koningdesign.
-
AuthorPosts
-
May 31, 2022 at 22:16 UTC - Views: 52 #70847
koningdesign
ParticipantI am having difficulty trying to learn which CSS selectors I need to use to switch from 3 column on desktop, to 2 column on specific view widths. This is just for one particular page.
More specifically, it is the Home page that has two rows of three columns.
I tried this code in my custom css to no avail:
@media screen and (min-width: 640px) and (max-width: 948px) { .page-id-14 .wp-container-6.wp-block-column, .wp-container-8.wp-block-column, .wp-container-10.wp-block-column, .wp-container-14.wp-block-column, .wp-container-16.wp-block-column, .wp-container-18.wp-block-column { flex: 50%; } }
Since this site is not live yet, please allow me to provide you the link privately.
Thanks for your help!
June 1, 2022 at 01:05 UTC - Views: 49 #70848Weaver
KeymasterIf you create a private post, only the moderators can see the post.
June 1, 2022 at 02:04 UTC - Views: 46 #70849This reply has been marked as private.June 1, 2022 at 07:45 UTC - Views: 52 #70850scrambler
ModeratorYou are using the block editor column block, and so it only has the option to stack them in one column on mobile.
We could create CSS to change that to two columns on mobile, but that would not help you as each row is a different block, so you would end up with 2 col, 1 col, 2 col 1 col…
To have all the boxes flow in either 2 rows of 3 columns or 3 rows of two columns, they would need to be created as one set of boxes.
If you have Plus, you could use the Flex columns widget to create that layout as the widget has the option for different number of columns on each device a explained below
X-Plus Flex Columns Widget: Usage and Customizations – Weaver Xtreme Guide (weavertheme.com)
Then you would need to use the Shortcode plugin to insert that widget inside your content area.
An other way would be to do it with HTML as explained in the Guide article below, then we can use Custom CSS to change the mobile behavior to what we want
Responsive Columns and Widgets – Weaver Xtreme Guide (weavertheme.com)
Or you may want to look for custom column blocks with a option to change the number of columns on different device sizes
June 1, 2022 at 17:06 UTC - Views: 42 #70851koningdesign
ParticipantThank you for covering multiple options for me!
I am eager to become more familiar with the Plus Plugin and it’s shortcodes, but can you provide a little more direction to get me started?
Also, considering my client’s lack of technical skills, will the Flex columns widget still allow them to add/edit the content in the WordPress Block Editor?
It’s unfortunate, but I think WordPress should have considered the option to switch from a 3 column 2 row layout, to a 2 column 3 row layout within the Columns Block Editor.
When I have time I will investigate, custom column blocks for changing the number of columns on different device sizes.
Thanks again!
June 1, 2022 at 17:49 UTC - Views: 41 #70852Weaver
KeymasterI believe it might be difficult to mix the FlexColumn shortcode into the Block Editor work flow. Flex Column is a fairly complex shortcode, and requires significant understanding to use effectively, with options being required in more than one place. If your goal is to build a site for a customer that you want to use the block editor (and that is really a sound strategy these days), using shortcodes of almost any kind is a bit out of the standard Block Editor work flow.
However, there are many plugins that add new blocks to the Block Editor. I have not searched, but it is possible there is a plugin that can build columns based on screen width.
I would suggest scanning the plugin library for a block editor plugin that might do that.
June 1, 2022 at 17:58 UTC - Views: 36 #70853Weaver
KeymasterThis column block might work for you. The plugin is available from the WP plugin repository.
The docs says you can select columns responsively. You would have to build the specific page content individually.
June 1, 2022 at 18:42 UTC - Views: 33 #70854koningdesign
ParticipantOK, will check out.
Thanks very much!
September 14, 2022 at 21:42 UTC - Views: 21 #71126koningdesign
ParticipantAs it turns out the Columns Manager Block plugin proved to be more difficult to customize, and too bloated for what I was needing. I did discover, GenerateBlocks (free version). This allowed me to do exactly what I wanted by using their GridBlock. Even better it is far less bloated.
Thanks for your help and direction in having me scan the WP plugin library!
-
AuthorPosts
- You must be logged in to reply to this topic.