Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot nest container shortcodes #105

Open
mikesetzer opened this issue Mar 10, 2023 · 1 comment
Open

Cannot nest container shortcodes #105

mikesetzer opened this issue Mar 10, 2023 · 1 comment

Comments

@mikesetzer
Copy link
Member

Describe the bug
Placing [container] shortcode within another [container] shortcode does not create nested containers. It instead closes all open Athena shortcode tags, such as rows, cols, etc.

Steps to Reproduce

  1. Place container shortcodes within another container shortcode. Can be an immediate child, or not.
  2. Save page and view elements panel.

Expected Behavior
Should create nested container divs. Useful for placing a container inside a container fluid to create a full-page background.

Possible Fix

Your environment:

  • Device: Windows Desktop
  • OS: Windows 10 21H1
  • Browser & Version Chrome v111.0.5563.64
  • WordPress Version: 6.1.1
  • Plugin Version: 0.7.1

Additional context
Can use jumbotrons or Gutenberg groups to add the necessary divs instead.

Capture
Capture1

@jmbarne3
Copy link
Contributor

Taking a look over this again today as I had another issue I just resolved and pushed out a patch for. I'm not 100% how we're going to approach this, as it's a fairly well known problem within WordPress itself that at this point they are very likely not going to try to correct, because they don't want people using shortcodes anymore. They've devoted a section of their Shortcode documentation to this particular problem. There are some tricks that can be tried to resolve the issue, but it might be good to consider other approaches. If the end goal is to have a single wrapping container around all the content on the page, would it make more sense to add a template to the theme that includes a container around the_content()?

In addition, I'm not sure I'm seeing the reason for using nested containers, as that generally is not going to accomplish anything, since its primary purpose is to set the x-axis margins and center the content (or stretch it in the case of a container-fluid). So the most common use case for containers will be to open/close and then open/close another, with some full width content in between.

Where it would be useful for us to be able to nest things is with rows and cols, where nesting is very common. We have worked on a number of workarounds for this in the past, with none of them really panning out. I'll do a little more exploration on this today if I have a chance and update the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants