{"id":416854,"date":"2025-01-02T08:00:00","date_gmt":"2025-01-02T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/custom-anchor-block\/"},"modified":"2025-01-03T02:09:00","modified_gmt":"2025-01-03T02:09:00","slug":"custom-anchor-block","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/custom-anchor-block\/","title":{"rendered":"Custom Anchor Block"},"content":{"rendered":"<p>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.<\/p>\n<p>Key Features:<br \/>\n* Create anchor links as text or buttons<br \/>\n* Fully customize button colors (background, text, and border)<br \/>\n* Choose from different button styles (Primary, Secondary, Outline)<br \/>\n* Select button sizes (Small, Normal, Large)<br \/>\n* Multi-language support (English and Spanish available)<br \/>\n* Easy to use interface integrated with the block editor<br \/>\n* No coding knowledge required<\/p>\n<p>Perfect for:<br \/>\n* Long-form content navigation<br \/>\n* FAQ sections<br \/>\n* Table of contents<br \/>\n* Landing pages<br \/>\n* Product documentation<br \/>\n* Course materials<\/p>\n<h3>Usage<\/h3>\n<ol>\n<li>Add a heading or paragraph where you want users to scroll to<\/li>\n<li>Set an HTML anchor ID in the block\u2019s Advanced settings (e.g., \u201csection1\u201d)<\/li>\n<li>Add the Custom Anchor Block where you want the link to appear<\/li>\n<li>Enter the same anchor ID<\/li>\n<li>Choose between text or button style<\/li>\n<li>Customize colors and appearance as needed<\/li>\n<\/ol>\n<h3>Development<\/h3>\n<p>This plugin is developed using modern JavaScript and build tools. The source code is available in the <code>\/src<\/code> directory.<\/p>\n<h4>Build Tools<\/h4>\n<ul>\n<li>Node.js and npm are required for development<\/li>\n<li>The plugin uses @wordpress\/scripts for building<\/li>\n<\/ul>\n<h4>Development Setup<\/h4>\n<ol>\n<li>Clone the repository<\/li>\n<li>Install dependencies:<br \/>\n   <code>npm install<\/code><\/li>\n<li>For development with auto-rebuild:<br \/>\n   <code>npm run start<\/code><\/li>\n<li>For production build:<br \/>\n   <code>npm run build<\/code><\/li>\n<\/ol>\n<h4>Source Files<\/h4>\n<ul>\n<li><code>\/src\/index.js<\/code> \u2013 Main JavaScript source code for the block editor containing React components and block registration<\/li>\n<li><code>\/src\/style.css<\/code> \u2013 Original CSS styles for both editor and frontend display<\/li>\n<\/ul>\n<h4>Build Output<\/h4>\n<ul>\n<li><code>\/build\/index.js<\/code> \u2013 Compiled and minified JavaScript<\/li>\n<li><code>\/build\/index.asset.php<\/code> \u2013 WordPress dependencies and version information<\/li>\n<li><code>\/build\/style-index.css<\/code> \u2013 Compiled and optimized CSS<\/li>\n<\/ul>\n<h4>Development Dependencies<\/h4>\n<p>The plugin uses the following development tools:<br \/>\n* @wordpress\/scripts: Provides build tools and configurations for WordPress block development<br \/>\n* Package configuration in package.json:<br \/>\n      <code>json<br \/>\n  {<br \/>\n    \"scripts\": {<br \/>\n      \"build\": \"wp-scripts build\",<br \/>\n      \"start\": \"wp-scripts start\",<br \/>\n      \"format\": \"wp-scripts format\",<br \/>\n      \"lint:js\": \"wp-scripts lint-js\"<br \/>\n    },<br \/>\n    \"devDependencies\": {<br \/>\n      \"@wordpress\/scripts\": \"^26.0.0\"<br \/>\n    }<br \/>\n  }<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add customizable anchor links as text or buttons with custom colors to create smooth in-page navigation in WordPress.<\/p>\n","protected":false},"author":65,"featured_media":416855,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Custom Anchor Block - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Add customizable anchor links as text or buttons with custom colors to create smooth in-page navigation in WordPress."},"footnotes":""},"categories":[1],"tags":[1835,745,233,237,978],"class_list":["post-416854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-anchor","tag-blocks","tag-gutenberg","tag-links","tag-navigation"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/416854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=416854"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/416854\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/416855"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=416854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=416854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=416854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}