From your static page you can make a jQuery GET request ( using jQuery is not mandatory though can be the easiest way) to the default endpoint posts
of the WP rest of your installation.
More info about WP REST here:
https://developer.wordpress.org/rest-api/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<ul id="remoteList">
</ul>
<script>
jQuery.get('//sub.example.com/wp-json/wp/v2/posts').then(
function(response){
jQuery.each(response,function(index,post){
console.log(post);
$('#remoteList').append('<li><a href="'+post.link+'" target="_blank">'+post.title.rendered+'</a></li>')
})
}
);
</script>
</body>
</html>
Related Posts:
- How to avoid duplicates when creating recent network posts
- how do I get a specific post from a post with a subcategory in WP
- Automatically create child pages and grandchild pages when saving a (parent) page
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- How do I exclude recent post from recent post php widget
- Second transition_post_status hook fired instead of the first
- How to store post ID’s in cookie or session to display the same posts later
- Which hook/action will help me solve my problem?
- How can I add extra word in permalink when someone click download button?
- Post + form + action + results on the same page
- Open post-content in archive page in a Modal box with bootstrap
- remove post that has no content
- Loading index.php contents which located outside blog folder for post single page
- get post content of particular post by url
- Post repeating with infinite scroll
- Custom posts in different columns style
- Get children post mime type using parent post_ID wp_post
- How to show only subcategories in parent category not parent category?
- 404 error when I acess the second page of post-type
- Which PHP page is the Default Posts Page
- retrieve post data and insert it in seperate static html page without WordPress
- WP Insert Post and then go to post
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Returning data instead of echoing/printing
- Display related posts without a plugin
- How to check if the current page is at a specified path in the URL?
- Counting Search results, and displaying the offset per page
- Count posts on multisite with blog id
- Function works everywhere, how to keep it to execute when creating a new post
- Making (and edit existing) posts with ID included
- Copy taxonomy terms from one post to another programmatically
- Parsing Menu Items and Blog Posts
- Pagination on Custom Post
- $wpdb returns duplicate posts
- How to show an entire post content and not also the excerpt?
- Get latest post from all categories except one
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Update post title from external file?
- Parse error: syntax error, unexpected end of file
- Show recent posts starting at a specific number archive
- Automatically add images to a menu
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Load Posts on Click via Ajax into a DIV
- How to catch wordpress post ID when it’s published
- set post limit at load more ajax wordpress
- How do I get the content excerpt of the recent post?
- WordPress query undefined offset in loop
- Find Site ID From WP_Post
- WP_Query: getting posts where custom field exists
- Array to string conversion on array_map
- Store metakey value as an array
- Increment paged on WP_Query
- Only show first image in foreach loop
- How to use mysql LIKE with wpdb?
- Reading settings in the home page precisely home.php
- Do I need to edit my theme in order to change the title of my blog page?
- Add new post in existing categories using wp_insert_post
- WordPress upload file size error even after raising php limits
- How do I add more options to the post-new.php page?
- get post id from wp_insert_post for get_template_part
- Display css ONLY on most recent post of specific category?
- create front-end users post list by specific category
- Incrementing PHP variable onclick to display posts by month
- Modify main query before it run without pre_get_post
- Displaying list of posts in category page
- .html end of URl affected to SEO?
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Get the id of all images in a post
- Displaying content on posts page based on category
- Do not duplicate posts with multiple categories in multiple loops
- how to make an array of post id’s in is_single
- Loading Posts & Category with Ajax
- Four posts per row [closed]
- array_rand not working correctly?
- Update if post with specific title exists
- Need help removing […] after excerpt
- show recent posts php code error?
- Error display post thumbnails for previous and next post
- WP_Query() load selected post
- Post to WordPress from another Server via PHP
- Unable to render custom field after attempt to generate a list of recent post in page template
- how to edit a specific post slug using a php code?
- form $_post action value gets truncated after it passes through two forms
- How to pick “full/thumbnail” images in the loop?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Saving a post ID to use in a form elsewhere on website
- WordPress Search
- Update value of a associative array with update_post_meta
- Wrap posts p tags in div
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Prevent post from being published and show error
- Wp Query : Order by distance lat,lon
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- remove specificly the last tag in all posts
- Pagination in single.php
- Pagination at category doesnt work with same name of page
- Add posts to custom table in database instead of wp_posts
- get value from get_post_meta then reuse it in another get_post_meta
- Edit and delete permissions pages and posts
- understand what code is doing when prepending /blog