0.0.3 • Published 3 years ago

wordpress-nextjs v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Wordpress Next.JS Connector

Utility package to connect Next.js to a Wordpress instance. WARNING! This package is still a work in progress and it's being developed continuously, because of this, no production site should use this yet. If you're using this package make sure to set the current version in your package.json so future updates don't break the code.

Installation

The connector can be installed as a npm package into a front-end using Next.js.

yarn add wordpress-nextjs

or

npm i wordpress-nextjs

Once installed call Wordpress.init(URL) in your _app.js file, example:

import React from 'react'
import Wordpress from 'wordpress-nextjs'

function MyApp({Component, pageProps}) {

    Wordpress.init('https://wordpress.yourdomain.com')

    return <>
        <Component {...pageProps} />
    </>
}

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago