# Getting started

For experianced Wordpress users, there is our Wordpress plugin, which integrates with Wordpress's own database and thereby offers extended functionality.&#x20;

**Please note** that the plugin integrates directly with the Wordpress database, which means that the Wordpress configuration and other plugins can affect the plugin, and sometimes cause problems. This option thus requires some own administration and is mainly intended for experienced Wordpress users.

{% hint style="warning" %}
**Allways check the connection to MFN(Settings -> MFN Feed) when doing major changes such as:** \
**Moving the site  to a new domain or adding plugins and/or server configurations that prevents incoming or outgoing HTTPS traffic.**\
\
**From v.0.084 there will be an error message if the connection is down:**\
**Could not validate server side subscription, try to resubscribe**
{% endhint %}

## Description

The MFN Wordpress Plugin lets the user sync news items for a particular company from mfn.se to their Wordpress site. It also adds a WebSub compliant posthook that is used to automatically receive news. when they're being published by the company through mfn.se.

## What it does

Once installed, the plugin creates a few new things that are added to the Wordpress site and database:

1. A new post type `mfn_news`
2. A new taxonomy `mfn-news-tag`
3. New terms in the new taxonomy that describes news items
4. Adds Widgets: *MFN News Feed Widget*, *MFN Archive Widget* and the *MFN Subscription Widget*

## Links

Releases zip-package of the plugin can be found here:\
<https://github.com/modfin/mfn-wp-plugin/releases> (Latest version: [Latest](https://github.com/modfin/mfn-wp-plugin/releases/latest))

Code at:\
<https://github.com/modfin/mfn-wp-plugin>

Composer:\
<https://packagist.org/packages/modfin/mfn-wp-plugin>

The plugin should be compliant with both a standard WP installation and Bedrock version: <https://roots.io/bedrock/>

## Installation / Getting started

Start off by downloading the plugin from the links above.

There are three ways to install the the plugin:

* Download and extract the zip package it into your `wp-content/plugins` directory
* Upload the zip package with the built-in installer of Wordpress at:`http://your-site.com/wp-admin/plugin-install.php` (click the Upload plugin button)
* Use composer (a tool for php dependency management), simply run:`$ composer require modfin/mfn-wp-plugin`

Once installed, activate the plugin by pressing "Activate". This will create the post type, the taxonomy and all the corresponding terms.

A new menu item, "MFN News Items" should now be visible in the root of the WP-admin menu. Also if you look in the menu item Settings, you should see the options "MFN Feed" which is where the plugin settings are located.

1. Go to Settings -> MFN Feed
2. Fill in the information in the left column fields

* Sync URL: `https://feed.mfn.se/v1`
* Hub URL:  `https://feed.mfn.se/v1`
* Plugin URL: `{YOUR WEB URL}/wp-content/plugins/mfn-wp-plugin`
* Entity ID: (The Entity ID for the MFN feed, provided by your MFN contact)

1. Click "Save"
2. Finally click the button "Sync all" in the right column (Wait until the import of the feed is done which is indicated with "Done")
3. Now go back to MFN News Items in the WP-admin menu

In the MFN News Items section you should see a list of the imported news items and as well as the associated tags.

### Updates

Upon updateting the plugin make sure that the subscription between the plugin and MFN is still established.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://modfin.gitbook.io/mfn-wp-plugin/overview/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
