r/elementor • • 14d ago

Problem HELP: Advanced Custom Fields is Automatically Re-Formatting Pages?

I'm working on my personal portfolio website and I've been running into a crazy niche issue that my mentors and research weren't able to help me with. On my works page, I want to create a post template + custom post type + advanced custom fields combo that lets me write in the details of a project and have it automatically upload to a page and grid system.

I was able to create a "Single Post" template that works great in isolation, but once it fills in from ACF the text resets to paragraph defaults, the image resizing returns to default settings, and the containers switch to horizontal fill instead of vertical.

I'm using the Astra theme (trying to keep it as unobtrusive as possible) but from my experimentation this doesn't seem like a theme template. Does anyone have any advice for troubleshooting this? I'd be happy to answer any questions as they come up.

1 Upvotes

11 comments sorted by

•

u/AutoModerator 14d ago

Looking for Elementor plugin, theme, or web hosting recommendations?

Check out our Megathread of Recommendations for a curated list of options that work seamlessly with Elementor.


Hey there, /u/Mammoth_Sand_2021! If your post has not already been flaired, please add one now. And please don't forget to write "Answered" under your post once your question/problem has been solved. Make sure to list if you're using Elementor Free (or) Pro and what theme you're using.

Reminder: If you have a problem or question, please make sure to post a link to your issue so users can help you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Early-Community9943 14d ago

Sounds like your Single template isn't actually loading for the CPT. Check its display conditions include the new post type, otherwise Astra's default single takes over.

1

u/Mammoth_Sand_2021 14d ago

That's what I thought too, but the specific text boxes filling from ACF are the same on both and if I add a pink box or something to the container on the template with CSS it shows up on the filled in page (surrounding the poorly filled in text)...

1

u/Early-Community9943 13d ago

Ah ok, so the template is applying but the ACF text renders differently. I'd compare the field type and its formatting setting, a WYSIWYG vs plain text field can do exactly that.

1

u/Mammoth_Sand_2021 12d ago

I might be misunderstanding you, but I don't think it's just the type formatting because the container is also reverting to horizontal + no margins :(

1

u/Early-Community9943 12d ago

Ah, if the container reverts too then that single template probably isn't the one loading. Check display conditions, another template might be taking priority.

1

u/KK-Wait 14d ago

Two different templates are in play here, and it's easy to style one while looking at the other.

The project page itself only uses your Single template if its display condition targets the custom post type (Projects > All), not Posts. But the cards on your works page come from the Loop Item template behind the Loop Grid, which is a separate template with its own styling. Designed everything in the Single and the grid shows plain paragraphs and full width images? That's usually why. Quick check on the live site: open one project, right click, Inspect, and look for an elementor-location-single wrapper. No wrapper means the template isn't loading and Astra is showing its default single.

2

u/Mammoth_Sand_2021 12d ago

I found the "elementor-location-single" wrapper, so I'm not sure what that means for this! Specifically, it's under: <main id="main" class="site-main">, and the wrapper is:

<div data-elementor-type="single-post" ... "**elementor-location-single** post-429 project type-project status-publish ...

1

u/KK-Wait 11d ago

Good, that rules out the conditions: your Single template is the one loading. So it’s not the wrong template, it’s its styles not making it to the page. Text back to paragraph defaults, images at default size and containers in a row is exactly what a template looks like with no CSS.

Elementor writes each template’s styles to its own file. In the page source, search for post- followed by the template’s ID (you’ll see it in the URL when you edit the template), something like uploads/elementor/css/post-123.css. Not there, or a 404? Elementor > Tools > Regenerate CSS & Data, clear any cache or optimization plugin, reload. If that fixes it, setting the CSS Print Method to Internal Embedding stops it coming back.