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 526 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Conditional Output based on Date Time Picker Field in Bricks

Conditional Output based on Date Time Picker Field in Bricks

In the past, we showed how elements can be conditionally output based on a post's Date type of ACF field here. This Pro tutorial for…
Categories:
Pro
Frontend Editing with ACF in Bricks

Frontend Editing with ACF in Bricks

This Pro tutorial provides the steps to show a form on single posts on the front end for admins and the post author using which…
Categories:
Pro
Google Maps JavaScript API in Bricks

Google Maps JavaScript API in Bricks

This Pro tutorial provides the steps to show post-specific maps with custom marker content in Bricks using Google's Maps JavaScript API and Advanced Custom Fields.…
Categories:
Pro
ACF Post Object Query Loop inside a Posts Query Loop in Bricks

ACF Post Object Query Loop inside a Posts Query Loop in Bricks

How to loop through a CPT and within each post, output a list of related posts.
Categories:
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
Conditionally Hiding Bricks Filters based on Select Filter Value

Conditionally Hiding Bricks Filters based on Select Filter Value

How show or hide Bricks' filter based on the selection made by another filter.
Categories:
Tags: