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

Related Tutorials..

Pro
Featured Image’s Meta in a Bricks Posts Query Loop

Featured Image’s Meta in a Bricks Posts Query Loop

How to output values of custom fields for the featured image of current post in a query loop
Categories:
Tags:
Pro
ACF Term Meta on Single Posts in Bricks

ACF Term Meta on Single Posts in Bricks

Consider this scenario: CPT: Project Custom taxonomy: Project Type Each project will be assigned only one project type. Project Type taxonomy's custom field: Project Type…
Categories:
Accessing ACF Repeater Sub Fields Programmatically in Bricks Query Loop

Accessing ACF Repeater Sub Fields Programmatically in Bricks Query Loop

It is possible to output sub field's values when a Bricks query loop's type has been set to a ACF Repeater without writing code. This…
Categories:
Pro
ACF Taxonomy Field Value in Single Posts

ACF Taxonomy Field Value in Single Posts

Consider this scenario: CPT: Movie Movie CPT Taxonomy: Movie Genre Movie Genre Taxonomy's field: Genre Color Each movie will have only genre set. The requirement…
Categories:
Tags:
Pro
Upcoming Events with ACF Date Sub field Repeaters grouped by Month Years in Bricks

Upcoming Events with ACF Date Sub field Repeaters grouped by Month Years in Bricks

In the comments section of Upcoming Events Accordion in Bricks Grouped by 'Month Year' a member asked: CPT: eventACF Field: event_dates (Repeater) with event_date sub…
Categories: