black friday sale

Custom Fields
Re-Envisioned
Support General Dropdown of contents OR anchor

  • Creator
    Topic
  • #22786
    web@homair.com
    Participant

    Hi,
    I’m using a select_advanced to choose a content in a list (to create a link in my template).

    [
          'name' => 'Link',
          'id' => "cta_link",
          'type' => 'post',
          'post_type' => ['page'],
          'field_type' => 'select_advanced',
          'query_args' => [
            'post_status' => 'publish',
            'posts_per_page' => -1,
          ],
     ]
    

    Is it possible to be able to either select a content in the list, or enter an anchor as “#anchor”, to create a “local link”.

    The purpose is to use this link on a button, and this button can either go to another page, or go to an anchor in the current page.

    Thanks for your help.
    Etienne

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #22790
    Long Nguyen
    Moderator

    Hi,

    The field post helps you to save post IDs as a post meta then you can follow the template usage to show posts on the frontend. It just likes the related post.

    Because each page has different anchors so you should create links in the current page manually.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.