Skip to content

Enhanced Display Options for AlphaListing Post Views #29

@Lin87

Description

@Lin87

Feature Request: Enhanced Display Options for AlphaListing Post Views

 

Summary

Add richer display controls to the AlphaListing block (when Display type is set to Posts) and mirror these settings in the [alphalisting] shortcode and its default template. These options will let editors fine-tune post content and featured image presentation in both the block editor and shortcode output.
 

Background

Site editors need more flexibility when surfacing post content via AlphaListing. Currently, the block exposes limited post rendering controls, and the shortcode/template lack parity with block settings. Extending both interfaces keeps the block and shortcode aligned and avoids regressions for legacy implementations.
 

Requirements

 

Post Content Options

  • Add a toggle to switch between showing the full post content or the post excerpt.
    -- Default: Excerpt (toggle enabled).
  • When excerpt display is enabled, surface a numeric control for the excerpt length.
    -- Default: 55 words (match WordPress core defaults).
     

Featured Image Options

  • Provide a control to toggle featured image display on/off (if not already present).
  • Add an alignment selector limited to left and right options.
    -- Default: left.
  • Offer a dropdown for selecting the image size slug.
  • Allowed values: thumbnail, medium, large, medium_large.
    -- Default: thumbnail.
  • Introduce mutually exclusive numeric inputs for custom width and height (pixels).
    -- Defaults: 150 × 150.
  • When custom dimensions are set, disable the size-slug selector, and vice versa.
     

Shortcode and Template Parity

  • Add corresponding shortcode attributes so legacy users can access these options.
  • Update the default shortcode template to respect the new attributes and output logic.
  • Document new shortcode arguments (e.g., in readme.txt).
     

Acceptance Criteria

  • New block controls appear only when Display type is Posts.
  • Defaults preserve existing behavior (excerpt output with thumbnail aligned left at 150px when applicable).
  • Custom dimensions and size slugs are mutually exclusive, with clear UI/validation in the block editor and shortcode handling.
  • Shortcode renders match the block when the same options are set.
  • Automated or manual regression checks confirm no impact on non-post display types.
     

Testing Notes

  • Verify block editor inspector controls across toggled combinations (excerpt vs. full content, size slug vs. custom dimensions).
  • Test front-end rendering for both block and shortcode outputs to ensure consistent markup and image handling.
  • Confirm compatibility with theme image sizes and WordPress excerpt filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions