plugin-icon

Custom Anchor Block

제작자: onlinewebgrow·
Add customizable anchor links as text or buttons with custom colors to create smooth in-page navigation in WordPress.
버전
1.0.3
활성화된 설치 항목
10
최근 업데이트일
Jan 2, 2025
Custom Anchor Block

Custom Anchor Block enhances your WordPress editor by adding a versatile anchor link block. Create smooth-scrolling anchor links that can be styled as either text or buttons with fully customizable colors and styles.

Key Features: * Create anchor links as text or buttons * Fully customize button colors (background, text, and border) * Choose from different button styles (Primary, Secondary, Outline) * Select button sizes (Small, Normal, Large) * Multi-language support (English and Spanish available) * Easy to use interface integrated with the block editor * No coding knowledge required

Perfect for: * Long-form content navigation * FAQ sections * Table of contents * Landing pages * Product documentation * Course materials

Usage

  1. Add a heading or paragraph where you want users to scroll to
  2. Set an HTML anchor ID in the block’s Advanced settings (e.g., “section1”)
  3. Add the Custom Anchor Block where you want the link to appear
  4. Enter the same anchor ID
  5. Choose between text or button style
  6. Customize colors and appearance as needed

Development

This plugin is developed using modern JavaScript and build tools. The source code is available in the /src directory.

Build Tools

  • Node.js and npm are required for development
  • The plugin uses @wordpress/scripts for building

Development Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. For development with auto-rebuild: npm run start
  4. For production build: npm run build

Source Files

  • /src/index.js – Main JavaScript source code for the block editor containing React components and block registration
  • /src/style.css – Original CSS styles for both editor and frontend display

Build Output

  • /build/index.js – Compiled and minified JavaScript
  • /build/index.asset.php – WordPress dependencies and version information
  • /build/style-index.css – Compiled and optimized CSS

Development Dependencies

The plugin uses the following development tools: * @wordpress/scripts: Provides build tools and configurations for WordPress block development * Package configuration in package.json: json { "scripts": { "build": "wp-scripts build", "start": "wp-scripts start", "format": "wp-scripts format", "lint:js": "wp-scripts lint-js" }, "devDependencies": { "@wordpress/scripts": "^26.0.0" } }

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.7.4
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.