Core

Blocks, shortcodes and widgets

ExpertPress shows its catalog content anywhere on your site in four ways:

  • Gutenberg blocks, in the ExpertPress block category;
  • shortcodes, for the classic editor or page builders;
  • classic widgets, for sidebars;
  • Elementor widgets, which appear only when Elementor is active.

All four render the same published data as the plugin's own catalog pages. They do not create separate copies of your content.

Quick reference

Block Shortcode Classic widget Elementor widget
Service Catalog [expertpress_service_catalog] ExpertPress Service Catalog ExpertPress Service Catalog
Specialist Directory [expertpress_specialist_directory] ExpertPress Specialist Directory ExpertPress Specialist Directory
Specialist Profile [expertpress_specialist_profile] — —
Search Form [expertpress_search_form] ExpertPress Search Form ExpertPress Search Form
Booking Button [expertpress_booking_button] — ExpertPress Booking Button
Related Services [expertpress_related_services] — —
Catalog Entries [expertpress_catalog_entries] — —
Service page and its parts [expertpress_service_page], [expertpress_service_part] — —

To use a block that has no Elementor widget in Elementor, put its shortcode in Elementor's Shortcode widget.

Shortcode attribute rules

  • Attribute names. Use the snake_case names shown below, for example per_page, show_filters or service_id. WordPress lowercases shortcode attributes, so camelCase names such as perPage do not work. className cannot be set from a shortcode.
  • Yes/no values. 1, true, yes and on mean yes. 0, false, no, off and an empty value mean no.
  • Lists. Separate the IDs or keys with commas or spaces, for example "3,7,9".
  • IDs. Practice areas and languages are referred to by their term IDs, which you can see in Lists and registration questions.

The "chrome" attribute

Catalog, directory and profile blocks take chrome:

  • embed (the default) hides the plugin's own page heading, intro paragraph and "back" link, so the block fits inside your own page.
  • full keeps them.

If your theme already prints the page title, it can declare add_theme_support( 'expertpress-theme-owns-title' ), and the plugin heading is then always hidden.

Service Catalog

Block expertpress/service-catalog. It shows published services with filters and pagination.

Shortcode attribute Default Values and meaning
per_page 0 0 uses the site setting, which is 20 by default. Otherwise 1–100.
sort rating rating, newest, price, price_desc, soonest
keywords empty Starting search text.
price_min, price_max 0 A price range in whole units of the site currency. 0 means no limit.
language_ids empty Language term IDs.
direction_ids empty Practice-area term IDs. Note that direction_id, the singular form, is ignored by this block.
service_type / service_types empty Service type key or keys.
meeting_format empty individual or group.
duration empty to_45, 45_60, 60_90, over_90
show_filters yes Show the filter form. When it is off, visitors' filter choices in the address are ignored.
show_pagination yes Show the pager.
chrome embed embed or full

The block sidebar in the editor offers Keywords default, Per page (0 = settings), Sort, Show filters, Show pagination and Chrome. The other attributes can be set only in a shortcode or in the block's code view.

Pagination and filters. When the block is placed on an ordinary page or post, its filter, reset and pager links stay on that page (as ?paged=2 plus the filters). Several catalog blocks on one page share the same page number and filters.

Examples:

[expertpress_service_catalog]
[expertpress_service_catalog per_page="9" sort="price" show_filters="no"]
[expertpress_service_catalog direction_ids="12,15" meeting_format="individual" duration="45_60" chrome="full"]
[expertpress_service_catalog keywords="career" price_min="50" price_max="200" show_pagination="false"]

Specialist Directory

Block expertpress/specialist-directory. It shows specialists with published profiles.

Shortcode attribute Default Values and meaning
per_page 0 0 uses the site setting, which is 12 by default. Otherwise 1–100.
sort rating rating, newest, price, price_desc
direction_id 0 One practice-area term ID.
language_ids empty Language term IDs.
keywords empty Starting search text.
city empty Starting city.
meeting_format empty individual or group.
service_types empty Service type keys. These apply only together with direction_id.
show_filters yes Show the filter form. The form has What are you looking for?, City, Practice area, Languages and Sort by.
show_pagination yes Show the pager.
chrome embed embed or full

The editor sidebar offers Keywords default, City default, Direction ID, Per page (0 = settings), Show filters, Show pagination and Chrome.

Unlike the service catalog, the directory's filter form and pager always lead to the main specialists directory (/specialists/), not to the page where you placed the block.

Examples:

[expertpress_specialist_directory]
[expertpress_specialist_directory per_page="6" sort="newest" show_filters="0"]
[expertpress_specialist_directory direction_id="12" city="Berlin" chrome="full"]

Specialist Profile

Block expertpress/specialist-profile. It embeds one published specialist profile.

Shortcode attribute Default Values and meaning
profile_id 0 Required. The profile ID, the number in /specialists/<id>/.
show_services yes List the specialist's published services.
chrome embed embed or full

In the editor, choose the specialist with Select a specialist.

  • Without an ID, the block shows "Choose a published specialist in the block settings" in the editor only, and nothing on the site.
  • For a profile that is not published, the block shows "This specialist profile is not available."
[expertpress_specialist_profile profile_id="42" show_services="no" chrome="full"]

Search Form

Block expertpress/search-form. It shows a search form that sends visitors to the main catalog or the specialists directory.

Shortcode attribute Default Values and meaning
target services services or specialists. Decides where the form leads.
show_keywords yes Show the "What are you looking for?" field.
show_price no Show the minimum and maximum price fields. Services only.
show_direction no Show the "Practice area" select.
button_label empty The button text. The default is "Search".
[expertpress_search_form]
[expertpress_search_form target="specialists" show_direction="yes" button_label="Find an expert"]
[expertpress_search_form show_price="1" show_keywords="0"]

Booking Button

Block expertpress/booking-button. It shows a link to a service's booking form, or the booking form itself.

Shortcode attribute Default Values and meaning
service_id 0 The service ID.
slug empty The service slug, as an alternative to the ID. If both are given, they must match the same service.
style button button shows a link to the booking section of the service page. form shows the booking form inline.
label empty The link text for style="button". The default is "Book" (Записатися).
  • On a service page, the block uses that service automatically.
  • Anywhere else, you must give service_id or slug.
  • When booking is not possible. If the service is closed for booking or has no price, the block shows "Booking is not available for this service." If the service cannot be found, editors see a hint and visitors see nothing.
[expertpress_booking_button service_id="123"]
[expertpress_booking_button slug="career-change-planning-session" label="Book a session"]
[expertpress_booking_button service_id="123" style="form"]

Block expertpress/related-services. It shows related services for a published service.

Shortcode attribute Default Values and meaning
service_id 0 0 means the current service page. Outside a service page, the block needs an ID; without one it shows nothing.

If there are no related services, nothing is shown.

[expertpress_related_services]
[expertpress_related_services service_id="123"]

Catalog Entries

Block expertpress/catalog-entries. It shows a list of links into the catalog, one for each practice area or service type, with the number of services in each.

Shortcode attribute Default Values and meaning
kind direction direction for practice areas, or service_type for service types.
include, exclude empty Practice-area term IDs, or service-type values.
order auto directory (list order), count_desc (most services first) or label (alphabetical). The automatic order is count_desc when counts are shown, otherwise directory.
limit 0 0 shows all entries, up to a maximum of 64.
show_counts yes Show "N services".
empty omit omit hides entries with no services. show shows them. hide_block hides the whole block when it would be empty.
direction_id 0 Service types only. Limits the list to one practice area.
title empty The heading. The default is "Browse by practice area" or "Browse by service type".
[expertpress_catalog_entries]
[expertpress_catalog_entries kind="service_type" direction_id="12" limit="8" order="label" show_counts="no"]
[expertpress_catalog_entries include="4,7,9" empty="show" title="Our practice areas"]

Service page blocks

You can build a service page, or show a service on another page, from separate parts. Each part block has one setting, Published service ID:

  • Leave it empty on the service's own page to use the current service.
  • On any other page, enter the ID of a published service.
Block Title in the editor Shortcode part
expertpress/service-page Service page (the whole page) (use [expertpress_service_page])
expertpress/service-title Service title title
expertpress/service-status Public service status status
expertpress/service-media Service media media
expertpress/service-description Service description description
expertpress/service-parameters Service parameters parameters
expertpress/service-specialist Service specialist specialist
expertpress/service-terms Price and conditions terms
expertpress/service-booking Service booking booking
expertpress/service-reviews Verified service reviews reviews
expertpress/service-related Related services related
— (the "Report this service" box) report
[expertpress_service_page service_id="123"]
[expertpress_service_part part="terms" service_id="123"]

These two shortcodes accept only service_id and part. Any other attribute makes them show nothing.

If the service is not public, editors see "Choose an available published service." and visitors see nothing.

Classic widgets

Classic widgets live under Appearance → Widgets, on themes that use widget areas.

Widget Settings
ExpertPress Service Catalog Title, Number of items (1–24, default 6), Sort by (Rating, Newest, Price, Price (desc), Soonest available)
ExpertPress Specialist Directory Title, Number of items (1–24, default 6), Sort by (without Soonest available)
ExpertPress Search Form Title, Search target (Services or Specialists)

The list widgets always show filters and pagination.

Elementor widgets

The Elementor widgets appear in the ExpertPress category of the Elementor panel. Each has one Settings section:

Widget Settings
ExpertPress Service Catalog Number of items (1–24, default 6), Sort by
ExpertPress Specialist Directory Number of items (1–24, default 6), Sort by
ExpertPress Search Form Search target
ExpertPress Booking Button Service ID, Slug, Style (Button or Form), Label

For theme developers

Template overrides. Copy a template to your-theme/expertpress/blocks/<slug>.php to replace the markup of:

  • service-catalog
  • specialist-directory
  • specialist-profile
  • booking-button
  • search-form

The plugin's own versions are in templates/blocks/. Service page parts are overridden in your-theme/expertpress/service/<part>.php.

Filters and actions:

  • expertpress_block_template: choose a different template file.
  • expertpress_block_markup: change the final HTML of any block.
  • expertpress_service_catalog_per_page and expertpress_specialist_directory_per_page: change the default page size.
  • expertpress_register_blocks: runs after the plugin's blocks are registered.

Classic PHP templates. A classic PHP template that prints service parts must call expertpress_service_page_preflight() before get_header().

Caching. Pages with a booking button, the related services block or service parts are sent with no-cache headers, so slots and prices are always current.