11/08
2016
This plugin is designed to work with Advanced Custom Fields. It will allow you to select a page and then create links to a section on that page, assuming that page has ACF meta that follows a certain schema:, (*1)
page_sections
that is a Repeater field.page_sections
Repeater field has any number of fields, one of them having a Field Name of title
.The plugin will create a link that includes a sanitized copy of the title. The title is passed through WordPress' sanitize_title
function. The link will include the url of the page, so you can link to other pages., (*2)
You will also need to add that id property to the section on the page. Let's use this loop for an example:, (*3)
<section class="page-section section-<?php echo $title_slug; ?>" id="<?php echo $title_slug; ?>"> <?php // Content stuff here ?> </section>
, (*4)
, (*5)