0

I'm newbie, i have a simple php file ,there is my data like, title, body content, feature image, category and 1 custom file I want to save this data in my post My coding look like this

$title="my title";
$content="demo body content";
$image="google.com/some-image-path.jpg";
$category="tesy cate";
$custom_post_filed="test custom filed";

I have code like this, i havr this content in my front-end.php Please any brother help me how to this content automatically publish in my post, if conditions must apply please, thanks in advance 🙏

2
  • How does this relate to WordPress development? What have you tried? What specific problem are you having? Please edit your question to add more detail. – Pat J Feb 13 at 3:08
  • This is PHP separate from your WordPress site and you won't have the WordPress functions loaded? You could use the REST API to create a new post. You'll need to set up authentication e.g. the new app passwords in WordPress 5.6. – Rup Feb 13 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.