Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

javascript - Headless CMS (WordPress) + ReactJS. How to display prepend element from WP with react.js? Is it possible without PHP?

Headless CMS (WordPress) + ReactJS. How to display prepend elements from WP with react.js? Is it possible without PHP?

So I have custom post types, custom fields. I can display info entered in custom fields with no problem (Axios.get, using state)BUT I can't seem to figure out how to display prepend/append too. For example, I have a custom field for the price. The price value in the field (number) and prepend is a "$" sign. How can I display it too, so I do not need to enter it every time manually? Is it possible to accomplish this by using react.js /js? I really want to avoid using PHP. If no, How to use PHP for this purpose?

question from:https://stackoverflow.com/questions/65838011/headless-cms-wordpress-reactjs-how-to-display-prepend-element-from-wp-with

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...