Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alwaysblank/zelda

A more useful Link.
https://github.com/alwaysblank/zelda

acf links wordpress

Last synced: 6 days ago
JSON representation

A more useful Link.

Awesome Lists containing this project

README

        

# 👸 Zelda

**A more useful Link**

I don't want to store URLs for local content in the database: Neither do you. This allows you to store links to any kind of content in a better, safer way. It also allows you to define a bit of link metadata (i.e. text, target, etc).

## Features

- Select the content and taxonomy types *you* want to link to!
- *Never* store URLs in the database (all links are created at page-load)!
- Well, except for `uri` links, which are URLs by definition.
- ...But it does try and guess if uri links are local, and saves them without a host if they are (so you don't end up with staging URLs on production).
- Filter *everything* (**future release**)
- Add your own link types on the fly (**future release**)

## Usage

It's just a WordPress plugin, so plug it in!

Once you've done that, just add a Zelda field and then call it in your template like you'd do with any other ACF field:

```php
// page-template.php
the_field('example_zelda_field');
// Link Text!
```

This is the default behavior. You can also return a url or the array stored in the databased by setting `return_format`
to `url` or `array`.