Journal Blocks Plugin Documentation

Overview

Journal Blocks is a WordPress plugin designed to implement custom blocks for The Golfer’s Journal (TGJ) website. Originally, built for the 2022 home page design, the plugin provides a collection of specialized blocks that enhance the content creation experience. The blocks are now used throughout the site.

Plugin Structure

journal-blocks/
├── admin/           # Admin-specific functionality
├── blocks/          # Custom Gutenberg blocks
│   ├── css/        # Block-specific styles
│   ├── js/         # Block-specific JavaScript
│   └── scss/       # SCSS source files
├── includes/        # Core plugin classes
├── languages/       # Translation files
├── public/          # Public-facing functionality
└── docs/            # Documentation

Available Blocks

A flexible carousel component that supports:

  • Multiple slide types
  • Customizable height options
  • Frame and background options
  • Navigation controls
  • Auto-play functionality
  • Mobile-responsive images

Full Screen Image

A block for displaying full-screen images with:

  • Customizable text overlays
  • Text placement options
  • Color customization
  • Mobile optimization

Full Screen Video

A block for embedding and displaying full-screen videos with:

  • Video player controls
  • Customizable overlays
  • Responsive design

Member Perks

A specialized block for displaying member benefits and features.

Current Issue

A block for showcasing the current magazine issue with:

  • Issue information display
  • Subscription options
  • Featured content

Shop

An e-commerce focused block for:

  • Product displays
  • Category navigation
  • Featured items

Product Category Scroller

A horizontal scrolling display for product categories.

Image Block

A versatile image block with:

  • Multiple display options
  • Text overlay capabilities
  • Responsive design

Scroller Block

A horizontal scrolling component for content display.

Technical Features

  • Built on WordPress Gutenberg block system
  • Custom block registration and rendering
  • Frontend and editor-specific assets
  • Internationalization support
  • Activation and deactivation hooks
  • Admin and public-facing functionality separation

Dependencies

  • WordPress 5.0 or higher
  • Gutenberg editor
  • Flickity.js (for carousel functionality)
  • jQuery

Development

The plugin follows WordPress coding standards and best practices:

  • Object-oriented PHP
  • Namespaced JavaScript
  • SCSS for stylesheets
  • Modular architecture

Version History

  • 1.0.0: Initial release with core block functionality

Support

For support and documentation, visit: