L
L
Learde2020-06-01 20:48:22
WordPress
Learde, 2020-06-01 20:48:22

How to get posts from wordpress being a directory higher than wordpress itself?

There is a website that has WordPress installed in a specific directory. Let's say the blog directory is at the root of the page. I need to display the last three posts from the blog on the main page of the site (where, accordingly, WordPress is not installed and has nothing to do with it at all). What is the best way to implement this, in your opinion?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zorca, 2020-06-01
@Learde

Make a query to the WordPress database. If there is no access to the database, then get the necessary data through the REST API.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question