Advanced Custom Fields : CPT Options Pages

Advanced Custom Fields : CPT Options Pages

Wordpress plugin

Install on Wordpress

App Details

Small addon for ACF Options. Adds ACF location for each custom post type.

New feature in the major version 2!
Important!
After update to v2+ you must reconnect Field Groups to Options Pages

Now you can activate/deactivate CPTs and create custom options pages for each CPT.
By default, options pages are activated for all custom post types.

Usage

The default functions of ACF plugin (get_field, the_field, etc.) can be used to load values from a CPT Options Pages, but second parameter is required to target the CPT options.

This is similar to passing through a $post_id parameter to target a specific post object.

The $post_id parameter needed is a string containing the cpt_ and CPT name in the following format; "cpt_{CPT_NAME}" and for subpages you can copy generated ID while creating subpages.

Examples

In examples Custom Post Type name is projects.

So, let’s go!

Display a field

<p><?php the_field('field_name', 'cpt_projects'); ?></p> 

and the subpage’s field

<p><?php the_field('field_name', 'cpt_projects_testpage'); ?></p> 

Retrieve a field

<?php $field = get_field('field_name', 'cpt_projects'); // do something with $field ?> 

Display a sub field

 <?php if( have_rows('repeater_name', 'cpt_projects') ): ?> <ul> <?php while( have_rows('repeater_name', 'cpt_projects') ): the_row(); ?> <li><?php the_sub_field('the_title'); ?></li> <?php endwhile; ?> </ul> <?php endif; ?> 

Display with shortcode

[acf field="field_name" post_id="cpt_projects"] 

Please read documentation about shortcodes with ACF

Customization

 function cpt_projects_customize($cptmenu) { $cptmenu['page_title'] = 'Dev Custom title'; $cptmenu['menu_title'] = 'Dev Custom title'; return $cptmenu; } add_filter('cpt_projects_acf_page_args', 'cpt_projects_customize'); 

Don’t forget to replace cpt_projects_ to your custom post type name 🙂
It works only for first level options pages, not for subpages.

Donate

Support plugin

License

Copyright (c) 2023, Tusko Trush

Requirements

You must buy ACF PRO or ACF Options Page Addon.

Translation

qTranslate-XT

This plugin is compatible and has included ACF qTranslate.
Just enjoy!

qTranslate-X

If you are using Qtranslate-X, you must install ACF qTranslate.

WPML/Polylang

If you are using WPML or Polylang, you must add constant ICL_LANGUAGE_CODE to post_id,
for example: get_field('archive_title', 'cpt_projects_' . ICL_LANGUAGE_CODE).

Pricing

Starting from $0 per month.

Check Out the Vimeo Carousel Widget

By Common Ninja

Vimeo CarouselTry For Free!

App Info

Rating

Reviewers

7 reviews

Tags

advanced custom fields
archive
custom post type

Developed By

Tusko Trush

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Vimeo Carousel for Wordpress logo

Vimeo Carousel

Show Vimeo videos with a Vimeo carousel that displays clips in a smooth, flexible layout to boost visibility and engagement.

Collapsible Content for Wordpress logo

Collapsible Content

Use Collapsible Content sections to structure information on your site and make it easier for visitors to find what they need.

Twitch Feed for Wordpress logo

Twitch Feed

Show live streams and clips with a Twitch feed that keeps content fresh, boosts engagement, and helps visitors follow your channel more easily.

Course Registration Form for Wordpress logo

Course Registration Form

Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.

Corner Coupon Pop-up for Wordpress logo

Corner Coupon Pop-up

Add a corner coupon pop-up to highlight discounts, collect emails, and drive user engagement without interrupting browsing.

Events Calendar for Wordpress logo

Events Calendar

Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.

Donation Button for Wordpress logo

Donation Button

Add a donation button that lets users contribute easily using PayPal or Stripe, supporting causes directly from your site.

HIPAA Compliance Forms for Wordpress logo

HIPAA Compliance Forms

Create secure HIPAA compliant forms that protect sensitive data, offer full customization, and integrate easily for safe medical information collection.

Google Play Reviews for Wordpress logo

Google Play Reviews

Show Google Play reviews for your Android app to build trust, strengthen credibility, and help visitors make confident download decisions.

Website Search for Wordpress logo

Website Search

Add a Google powered search bar that delivers relevant results, improves navigation, and helps visitors find content fast.

Social Media & RSS Feeds for Wordpress logo

Social Media & RSS Feeds

Add social media and RSS feeds to your site to display fresh content, grow your online presence, and keep visitors engaged with real time updates.

Video Poll for Wordpress logo

Video Poll

Create interactive video polls that use engaging clips to boost participation, gather insights, and help visitors vote in a more dynamic way.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms