这是indexloc提供的服务,不要输入任何密码
Skip to content

Crocoblock/jet-engine-cct-single-page

Repository files navigation

JetEngine - Single page for Custom Content Type

Allows to create a custom single page for the CCT item based on the Listing Item template.

Usecase and Workflow

JetEngine CCTs allows you to create an optimized way to store the data in the WP database - it stores all the data in the single table.

With JetEngine Listings, you can output this data in format of list, grid, carousel, table etc. The only limitation - out of the box CCTs doesn't have a single page, similar to WP native CPTs.

This plugin allows to remove this limitation. It allows you to select what CCTs could have a single page and how will look like the URL of this page. Then, in the Listing Grid Item for given CCT you can add a link to this single page to allow user (or search engines) to visit it. Done!

Getting started

  • Download, install and activate this plugin as regular WP plugin;
  • Go to the CCT Single Page admin menu page;
  • Setup single page config for the CCTs you need;
  • Add an URL to the single page to the CCT listing.

Setting up the single page config

On the CCT Single Page you can setup configuration for the different CCTs created at your website. To start setup of your 1st config - click "Add new" button

image

Each setup includes the next settings:

image
  • Rewrite base - Defines the part of the URL between your home url and actual CCT slug.
image
  • Content Type - CCT to add a single page for.
  • Content template - Listing Item template, which will be used as main content template for the single page. You can use any builders supported by JetEngine to create it.
  • Slug field - CCT field, which will be used to generate a slug of the current CCT item for the URL. You can use specially defined field of your CCT, which is already formatted for the URL. Or any other text field of your CCT - plugin automatically formats it as URL slug.
image
  • Page title pattern - format of the page title, which will be generated for the current CCT item. Use fields of
  • Meta description pattern - format of the meta description for the page.

For the last 2 fields you can use any CCT fields in %field_name% format. For the Slug field field use plain field_name, without %.

For Page title pattern and Meta description pattern you can use plain array fields - they are will be imploded into the string.

Adding a single page URL into the CCT listing

  • Using Dynamic Link widget
image
  • Using linked image in the Dynamic Image widget
image
  • Using a filter callback on any field of this CCT (mostly for Timber/Twig listings)
image

Please note

URL can be correctlly retrieved, only when appropriate widget/callback is used in the context of the required CCT. In plain words - only inside CCT listing.

About

Allows to create a custom signle page for the CCT item based on the Listing Item template.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •