Tuesday, January 17, 2023
HomeWordPress Developmentblock editor - How get url from arguments to template half

block editor – How get url from arguments to template half


I’ve template half, the place utilizing block with social hyperlinks

<!-- wp:social-links -->
<!-- wp:social-link {"url":"https://check","service":"fb"} /-->
<!-- wp:social-link {"url":"https://check","service":"twitter"} /-->
<!-- wp:social-links /-->

Drawback in URL – once I hardcode it in template half, I see that each one hyperlinks efficiently render in frontend half. With out URL – nope. I’ve perform in PHP to render block and with out utilizing in template half it really works. I do not need render template half with empty URL, if consumer do not edit it. How can I get arguments from my perform in template half to not hardcode it?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments