PHPackages                             ralfhortt/wp-meta-box-address - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ralfhortt/wp-meta-box-address

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ralfhortt/wp-meta-box-address
=============================

A WordPress meta box for address data

2.1(5y ago)056MITPHP

Since Jan 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Horttcore/wp-meta-box-address)[ Packagist](https://packagist.org/packages/ralfhortt/wp-meta-box-address)[ RSS](/packages/ralfhortt-wp-meta-box-address/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

WordPress Meta Box Address data
===============================

[](#wordpress-meta-box-address-data)

Adding address data fields as a meta box

- Street / Streetnumber
- ZIP code / City
- Address Additionall
- Country
- Map

Installation
------------

[](#installation)

`composer require ralfhortt/wp-meta-box-address`

Usage
-----

[](#usage)

```
/*
new MetaBoxAddress(
    array $screen = ['post'],
    string $context = 'advanced',
    string $priority = 'default'
)
*/
```

### Serviceloader

[](#serviceloader)

```
use RalfHortt\MetaBoxAddress\MetaBoxAddress;

PluginFactory::create()
    ->addService(MetaBoxAddress::class, ['page'], 'advanced', 'default')
    ->boot();
```

### Standalone

[](#standalone)

```
use RalfHortt\MetaBoxAddress\MetaBoxAddress;

(new MetaBoxAddress(['page'], 'advanced', 'default' ))->register();
```

Hooks
-----

[](#hooks)

### Filter

[](#filter)

- `wp-meta-box-address/meta-box-identifier` - Change meta box id
- `wp-meta-box-address/meta-box-label` - Change meta box label
- `wp-meta-box-address/street-{$postType}` - Hide street field for $postType
- `wp-meta-box-address/streetnumber-{$postType}` - Hide streetnumber field for $postType
- `wp-meta-box-address/address-additional-{$postType}` - Hide address additional field for $postType
- `wp-meta-box-address/zip-{$postType}` - Hide zip field for $postType
- `wp-meta-box-address/city-{$postType}` - Hide city field for $postType
- `wp-meta-box-address/country-{$postType}` - Hide country field for $postType
- `wp-meta-box-address/latitude-{$postType}` - Hide latitude field for $postType
- `wp-meta-box-address/longitude-{$postType}` - Hide longitude field for $postType

#### Example

[](#example)

```
