Skip to main content

Overview

Visual Portfolio includes a custom post type called portfolio for organizing and displaying portfolio items. This post type provides a dedicated content structure for showcasing your work, projects, or products.
The Portfolio post type is registered in Visual_Portfolio_Custom_Post_Type class at classes/class-custom-post-type.php:15

Registration

The Portfolio post type is registered during WordPress initialization:

Enabling/Disabling

The Portfolio post type can be toggled in settings:
1

Navigate to Settings

Go to Visual Portfolio > Settings in the WordPress admin
2

General Tab

Find the “Register Portfolio Post Type” option
3

Toggle Setting

Enable or disable as needed (requires permalink flush)

Post Type Features

Supported Features

The Portfolio post type supports:
  • Title and editor
  • Featured images
  • Excerpts
  • Custom fields
  • Taxonomies (categories and tags)
  • Gutenberg editor
  • Thumbnail preview in admin

Custom Taxonomies

Portfolio Categories:
Portfolio Tags:

Admin Interface

Admin Columns

The admin list includes custom columns:
Custom Columns:
  • Featured Image Thumbnail
  • Portfolio Categories
  • Portfolio Tags
  • Date

Filtering by Taxonomies

Adds dropdown filters for categories and tags in the admin list.

Visual Portfolio Lists

The plugin also registers a vp_lists post type for storing saved portfolio configurations:

Saved Layouts

The vp_lists post type stores portfolio block configurations, allowing you to create reusable portfolio layouts.
Admin Features:
  • Shortcode column showing usage code
  • Block ID for referencing
  • Filter by layout type
  • Template selector

Capabilities

Custom capabilities for the Portfolio post type:

Archive Page Setup

Configure a custom archive page for portfolio items:

Archive Mapping

The Archive Mapping feature automatically creates portfolio layouts for archive pages:
Changing the archive page or toggling the Portfolio post type requires flushing permalinks. This is handled automatically via the defer_flush_rewrite_rules() method.

Gutenberg Integration

Forced Gutenberg Editor

Portfolio post type always uses Gutenberg:
This ensures compatibility even when Classic Editor plugin is active.

Allowed Blocks

The vp_lists post type restricts available blocks:

Custom Meta Fields

Portfolio settings are stored as post meta:

Template Hierarchy

WordPress template files for Portfolio post type:
Theme developers can override these templates in their theme directory.

REST API Support

Portfolio post type is exposed via REST API:
Endpoints:
  • GET /wp-json/wp/v2/portfolio - List portfolio items
  • GET /wp-json/wp/v2/portfolio/{id} - Get single item
  • POST /wp-json/wp/v2/portfolio - Create new item
  • PUT /wp-json/wp/v2/portfolio/{id} - Update item
  • DELETE /wp-json/wp/v2/portfolio/{id} - Delete item

Sitemap Integration

Portfolio items are included in XML sitemaps:

SEO Optimization

Built-in SEO support for portfolio items:

Admin Bar Menu

Quick access to portfolio items from the admin bar:
Shows dropdown with portfolios available on the current page.

Migration Support

When updating from older versions:
  • Visual_Portfolio_Custom_Post_Type - Post type registration (classes/class-custom-post-type.php)
  • Visual_Portfolio_Custom_Post_Meta - Meta fields handling (classes/class-custom-post-meta.php)
  • Visual_Portfolio_Archive_Mapping - Archive page integration (classes/class-archive-mapping.php)
  • Visual_Portfolio_Sitemap - Sitemap integration (classes/class-sitemap.php)

See Also

Content Sources

Using Portfolio items as a content source

Archive Mapping

Configure portfolio archives

Custom Post Meta

Working with portfolio meta data

REST API

Access portfolio items via API