Home Forums General Issues Create an SEO template with ACF


Create an SEO template with ACF

  • Hello there,

    I’ve been recently trying to create a template for my SEO pages with ACF.
    The goal is to set up pages with the same text, but an ACF keyword field meant to be used for the city I want to position the page on.
    For example, I have a page with the title “Help for your cheese cake in CITY” and CITY is an ACF field.

    I set up my ACF fields on my page model with the text that’s going to be the same on each page.
    I set up my Elementor model with the dynamical ACF field in order to use this ACF fiels I filled before on this model.
    I’m applying this Elementor model on my new page. Though, the ACF fields are NOT on this new page (but only on the model of page I created). So it cannot get the value of the ACF field as it’s not displayed on the page I’m trying to model.

    You didn’t get a single thing of what I said so let’s try to make it more simple.

    Let’s say I try to have a page model to duplicate for “Cheesecake in CITY”.
    This page model is called “[Model] Cheesecake in CITY”. On this page model, I create an ACF form with all the content I want to put on the page I’m going to duplicate later (title 1, title 2, content 1, content 2 etc ..).
    Then I’m creating another page I’m calling “Cheesecake in London”. With ACF, I create a form with only one line which is “City”. I enter the value “London” in this line.
    Then, I create an Elementor page model on which I’m going to insert the ACF form of the model page (title 1, title 2 etc ..). I apply this Elementor model on the “Cheesecake in London” page.
    The problem is that the Elementor model won’t find the value of “[Model] Cheesecake in CITY”, because it’s looking for the ACF values of the form on “Cheesecake in London”.

    The question is : how to make an Elementor model that gets the ACF fields of a specific page model ?
    Somehow I have the answer for this and I have to use “[acf field="{$field_name}" post_id="{$post_id}"]” with post_id being the “[Model] Cheesecake in CITY” id.
    But I just don’t know how to insert it in my Elementor model.

    Hope I’m clear with this unclear thread.

    Thanks in advance for your help.

  • Nevermind. Actually didn’t get to solve the problem.

    Instead of calling ACF field with my content, I just made an Elementor model with my content and shortcode.

    In the titles I use the shortcode dynamical tag and in my text editor (for paragraphs), I use the shortcode right in the text (Elementor accepts shortcodes in text in text editors but not in titles).

    So I’m just calling the ACF field in my content and it’s all good.

    I need to find how can I have a title and meta-description model now but that’s another story.


Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Create an SEO template with ACF’ is closed to new replies.