2017 © Pedro Peláez
 

library wordpress-page

Get current page attributes in WordPress

image

grottopress/wordpress-page

Get current page attributes in WordPress

  • Thursday, March 8, 2018
  • by akadusei
  • Repository
  • 1 Watchers
  • 0 Stars
  • 101 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 6 % Grown

The README.md

WordPress Page

Get current page attributes in WordPress., (*1)

Installation

Install via composer:, (*2)

composer require grottopress/wordpress-page

Usage

<?php
declare (strict_types = 1);

use GrottoPress\WordPress\Page;

// Instantiate
$page = new Page();

// `$page` now represents the current page (where it was instantiated)

// Get page title
echo $page->title();

// Get page description
echo $page->description();

// Get page URL
echo $page->URL('full');

// Get page number
echo $page->number();

// Get page type
print_r($page->type());

// Check if page is single post
if ($page->is('single')) {
    echo 'Single!';
} else {
    echo 'Not single :(';
}

// Check if page is 'tutorial' custom post archive
if ($page->is('post_type_archive', 'tutorial')) {
    echo 'Yay!!! Tutorials.';
} else {
    echo 'Nope :(';
}

Development

Run tests with composer run test., (*3)

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.

The Versions

08/03 2018

dev-dev

dev-dev

Get current page attributes in WordPress

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

08/03 2018

dev-master

9999999-dev

Get current page attributes in WordPress

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

08/03 2018

0.5.2

0.5.2.0

Get current page attributes in WordPress

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

02/03 2018

0.5.1

0.5.1.0

Get current page in WordPress

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

02/03 2018

0.5.0

0.5.0.0

Get current page in WordPress

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

20/01 2018

0.4.3

0.4.3.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

16/11 2017

0.4.2

0.4.2.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

10/11 2017

0.4.1

0.4.1.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

28/09 2017

0.4.0

0.4.0.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

14/09 2017

0.3.0

0.3.0.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

05/09 2017

0.2.1

0.2.1.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

14/08 2017

0.2.0

0.2.0.0

A library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

wordpress

10/08 2017

0.1.1

0.1.1.0

A simple library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress

10/08 2017

0.1.0

0.1.0.0

A simple library to get WordPress page elements

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

wordpress