-
johnottomagee
Hello Support !
Please go to:
https://understand-culture.com/Click on Countries.
Choose any country.
Choose any topic.For example Brazil>Agreements:
https://understand-culture.com/?cat=3300&tag=agreementsHow can I do two things:
1. Change the width of the container holding the content?
2. Change the spacing left and right of that container?Thanks !
John
.
-
George
Hello.
It would be better to use a Layout element and apply it on certain archives. Can you describe you taxonomy layout? Do you have countries set up as categories?
-
johnottomagee
That was fast.
Thanks, George.In the individual posts:
countries are categories,
and topics are tags.The topic-selections below
the respective countries in
the menu are are Custom Links:
i.e.Brazil>Agreements is:
https://understand-culture.com/?cat=3300&tag=agreementsDoes that help?
Do you need Admin access?John
-
George
Hey John.
Sure, if you could provide credentials on the private section, I could take a closer look, thanks!
-
johnottomagee
Please see below, George.
-
George
Ok, please edit the Examples layout element and remove All Archives from the Display rules. Add a new location: Post Category Archive -> All categories.
Then, create another Layout element and set a new location: Post Tag Archive -> All Tags in Display rules, then set your custom width in the Content tab.
-
johnottomagee
Thanks, George.
I think I got it right.
But most likely not.I set the width to 150 px
to be sure that I can adjust.I see not change.
-
johnottomagee
Thanks, George.
I think I got it right.
But most likely not.I set the width to 150 px
to be sure that I can adjust.I see no change.
-
I can see that even when I set Post Category Archive -> All categories in the element, then Save, it flips back to the Page Category Archive -> All categories.
This is very strange. I have a suspicion that the AI Engine (Pro) might be causing some issues. Is it ok, if I temporarily disable so I can troubleshoot?
-
johnottomagee
Yes, George.
-
johnottomagee
By the way … since yesterday
I have been having problems
with AI Engine. I hope to hear
back from their support team. -
Can I please edit the new element you have created? It seems you are already editing…
-
johnottomagee
I am on the backend.
Let me log out. -
The pages you want to modify are using URL parameters to filter the content according to category, then tag. This doesn’t allows us to use a Layout element and does not give us different body class to work with.
You would need to add a code snippet to dynamically add a
filtered-archivebody class on those pages.add_filter( 'body_class', function( $classes ) { if ( isset( $_GET['cat'] ) && isset( $_GET['tag'] ) ) { $classes[] = 'filtered-archive'; } return $classes; });Then, you would use this CSS:
.filtered-archive .grid-container { max-width: 500px; }Change the
max-widthproperty value accordingly.Let me know how it goes!
-
johnottomagee
Hi George,
First off, thanks so much for working
on this on a Saturday !This all looks a bit more complicated
than it needs to be. Isn’t there a simpler
way to determine the width of the posts,
and to modify the distance between the
posts and the container holding the menu?John
-
George
Yes, but this would require to also modify the width of the categories as well, for example on this page
https://understand-culture.com/category/country/brazil/But I assume, you don’t want to that. If you wanted to do that, we could use a Layout Element.
You are using the WordPress query variable system to display certain tag archives that belong to a certain category, for example
https://understand-culture.com/?cat=3300&tag=agreementsGeneratePress elements cannot distinguish URL parameters so we could isolate those pages. Neither, WordPress exposes any classes in the body tag so we could target those specific pages. Thus, the code snippet I provided, adds a class ONLY on those pages so we can target them.
- You must be logged in to reply to this topic.