blog page – Show preview of wordpress posts on external html sever

Question

I used to have this working, however, ionos started chartging me for having wordpress, when I said I am not paying for a free site they deleted access to my blog. All the program files are there but I cannot get my posts. I have had to remake my blog on the actual wordpress and it all links together fine. However, the code I was using looks for wp-blog-header.php located on the same server. What I need to be able to do is to access this file on the word press site. Currently my code is:

<?php
// Include WordPress
define('WP_USE_THEMES', false);
// Change path below to location of wp-blog-header.php on server
require('/****/homepages/45/********/htdocs/clickandbuilds//wp-blog-header.php');
// Change number below to show 1 or more post excerpts
query_posts('showposts=3');

?>

I have tried changing it to require(‘https://mysite.wordpress.com/wp-blog-header.php’);
but it cannot load and crashes my site.
Fatal error: Uncaught Error: Failed opening required

My question is fairly simple, how do I access the required file?

Also as my access through ionos, because they have blocked me from logging in to wordpress onboard my server, does this mean I have to bootstrap wordpress in order for the functions to work?
Since they deleted my access the onboard wordpress, my site didn’t break as it was still calling the required function, and getting a return, but no data was showing up in my blog previews.

Unfortunately, it seems hard to find straight and simple information on this as it always refers to using wordpress installed server side. Thanks

0
Rick 4 months 2022-08-02T05:26:23-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse