mrfdn.com – Seperti diketahui, WordPress memiliki fitur bernama Rest API.
Jika fitur ini diaktifkan kita dapat menggunakannya dengan bebas. Kita dapat menangkap daftar artikel di situs WordPress.
Salah satu cara menggunakan REST API WordPress adalah dengan Svelte/SvelteKit
SvelteKit memiliki fitur untuk menampilkan data/memuat data dari link API. Jadi tanpa basa-basi lagi, begini caranya.
- Pastikan website WordPress yang akan Anda gunakan sudah online dan API-nya diaktifkan. Anda dapat menguji API dengan mengetikkan ini di akhir domain.
contoh*.com/wp-json/wp/v2/posts
Jika sudah bisa diakses, silakan lanjutkan ke langkah berikutnya.
- Siapkan proyek Svelte.
npm create svelte@latest my-app
cd my-app
npm install
npm run dev
- Edit berkasnya
src/routes/+page.sveltemenjadi seperti ini:
<script>
import { onMount } from "svelte";
let posts = [];
onMount(async () => {
const res = await fetch("https://contoh*.com/wp-json/wp/v2/posts");
posts = await res.json();
});
</script>
<main class="container">
<h1>Fetch API WordPress using SVELTE</h1>
<p>Here is the list articles:</p>
{#each posts as post}
<article>
<header>
<h3><a href={post.link}>{post.title.rendered}</a></h3>
<img src={post.jetpack_featured_media_url} alt={post.title.rendered} />
</header>
{@html post.excerpt.rendered}
<footer>
<small>Diposting pada : <b>{post.date}</b></small>
</footer>
</article>
{/each}
</main>
- Jalankan sveldekit di terminal
npm run dev -- --open
Sekarang Anda telah berhasil membuat halaman website dengan konten yang berisi daftar artikel dari website WordPress
Semoga bermanfaat. semoga beruntung
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.