Dropdown of contents OR anchor

Support General Dropdown of contents OR anchorResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22786
    web@homair.com[email protected]
    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

    #22790
    Long NguyenLong 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 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.