10th Feb '23
/
0 comments

CPT Submenu Items in ACF Pro Options Admin Menu

This Pro tutorial provides the steps to add links to

  • a taxonomy terms
  • a custom post type's "Add New"
  • a custom post type's listing

admin pages under an Options page created with ACF Pro.

All code mentioned in this tutorial is to be added in the child theme's functions.php or a code snippets plugin.

Step 1

Let's create an ACF Options page by adding:

// Add ACF Options page. if ( function_exists( 'acf_add_options_page' ) ) { $options = [ 'page_title' => __( 'Site Options' ), 'position' => '2.38856', // as 3rd item 'menu_slug' => 'site-options', // if left empty, ACF will use the page title slug but prefixes it with acf-options-. ]; acf_add_options_page( $options ); }

To add fields in this options page, go to Custom Fields → Add New and create a new field group. For the location, select "Site Options".

Step 2

Add the ACF Options page as a submenu. This will be the first submenu item.

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 630 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Sub Field Value from the Last ACF Repeater Row in Bricks

Sub Field Value from the Last ACF Repeater Row in Bricks

Getting the value of a specific sub field of an ACF Pro‘s Repeater field and output in the query loop.
Categories:
Tags:
Pro
Programmatically populating ACF field values in WordPress

Programmatically populating ACF field values in WordPress

An example of how to set the values of a Select-type field with the names and labels of all public post types.
Categories:
Pro
ACF Repeater sub field value dynamic data condition in Bricks

ACF Repeater sub field value dynamic data condition in Bricks

This Pro tutorial provides the steps to output an element on single posts (can be of any post type) only if a specified ACF (Pro)…
Pro
Bricks Slider Images From ACF Flexible Content Sub Field

Bricks Slider Images From ACF Flexible Content Sub Field

Consider the following field group associated with Pages when using ACF Pro: "Page Fields" field group|_"Page Content" Flexible Content field|__"Layout 1" layout|___"Title" Text field|___"Layout 1…
Pro
Related Posts using ACF Post Object in Bricks

Related Posts using ACF Post Object in Bricks

Modifying the query loop to limit the posts to only related posts via an ACF Post Object custom field.
Categories:
Tags:
Pro
Category Grid with ACF Images in Bricks

Category Grid with ACF Images in Bricks

Creating a grid of post categories, each category card showing an image from an ACF field, category name & description.
Categories: