Can i "echo" the recent news from wordpress site to a subdomain site?
Hello i have a wordpress site and a html static site, both are on the same server so the thing i need to do is somehow implement the news from wordpress to the static one, and i find myself lost, how can this be achieved ?
If you mean "static HTML page" as hard-coded
*.html pages, than it's not possible. If it's php site, just use same database, connect to it with PDO and get needed values
$db = new PDO( "mysql:host=localhost;dbname=db-name", $config['components']['db']['username'], $config['components']['db']['password'] ); $query = $db->prepare('SELECT * FROM `news`'); $query->execute(); $tags = $query->fetchAll(PDO::FETCH_OBJ);
You can install json-api plugin, then get content from json link and echo it in your subdomain site. It's easilest way to get content without connect to another database.