在Elementor中保存一个部分的模板,其文本和图像取决于网站

发布于 2025-02-13 12:38:27 字数 366 浏览 0 评论 0原文

我必须创建一个带有WordPress的网站,并且所有网站在标题下都具有相同的设计,那里有图像,然后在其下面发短信。

现在,如果我只是在Elementor中创建一个部分的模板,我可以在任何地方复制同一部分,然后更改IMG和文本,但是如果我想对模板进行更改(例如,图像的不同高度或保证金等)。它不会改变我粘贴该模板的所有发生,因此我必须更改我手动的每个站点。

我熟悉vuejs,在那里您有能力创建组件,您可以将变量传递给某些文本或图像组件使用的变量,但是如果您在组件中更改该组件的每种情况的某些样式,则此组件的每一个情况都会更改。

在WordPress中,是否有类似的东西,我可以创建一个“组件”,它的文本和IMG链接中有占位符,然后我可以将另一个值传递给我使用此组件的每个站点?

I have to create a website with wordpress and all the sites have the same design under the header where there is an Image and then text under it.

Now if I were to just create a template of the section in elementor, I could copy that same section everywhere and then change the img and text but if I would like to do changes to the template in the future (eg. different height of image or margin etc.). It would not change all the occurences where I pasted that template and as such I would have to change every site I have manually.

I am familiar with vuejs and there you have the posibility to create components to which you can pass variables for some text or image the component uses but if you change some styling in the component every occurence of this component changes aswell.

Is there something similar to this in wordpress, where I can create a "component" which has placeholders in them for text and the img link and I can then pass a different value to every site where i use this component?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靖瑶 2025-02-20 12:38:27

通过您所说的声音,您想与Elementor中的“主题构建器”合作(假设这是您使用的内容?)并动态填充页面。

因此,您将在主题构建器内部创建一个模板 - 并使用ACF或JetEngine动态填充内容。

我希望这能使您更接近您要做的事情。如果您还没有使用过ACF或JetEngine-请查看它们...令人惊讶。

同样也...在Elementor中查看全局小部件...这也可能有所帮助。

祝你好运!

By the sounds of what you're saying you want to be working with the 'Theme Builder' in Elementor (assuming this is what you're using?) and dynamically populate your pages.

So, you'd create a template inside of theme builder - and dynamically fill the content using maybe ACF or JetEngine.

I hope this gets you a little closer to what you're trying to do. If you haven't used ACF or JetEngine - Check them out... Amazing.

Also too... in Elementor check out Global Widgets... this may help a little too.

Best of luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文