Giter VIP home page Giter VIP logo

zoninator's Introduction

Zone Manager (Zoninator)

Content curation made easy! Create "zones" then add and order your content! Assign and order stories within zones that you create, edit, and delete. Then use the handy API functions to retrieve and display your content in your theme. Or for those who are a bit code-averse, try the handy widget.

What does this plugin do?

This plugin is designed to help you curate your content. It lets you assign and order stories within zones that you create, edit, and delete, and display those groupings of related stories on your site.

How do I set it up?

After activating the plugin, you'll see a new "Zones" tab in your Dashboard's sidebar menu:

zones

Create your zones, and easily search for and add existing posts.

Once you've set up your zones, use the handy API functions to retrieve and display your content in your theme. Or, for those who are a bit code-averse, go to Appearance-Widgets and add Zone Posts widgets to display your zone posts in your sidebar or footer:

zone widget

The widget will pull the posts from the chosen zone:

zone display

More documentation for the plugin can be found on the WordPress.org plugin page.

Usage examples

You can work with with a zone's posts either as an array or a WP_Query object.

WP_Query

$zone_query = z_get_zone_query( 'homepage' );
if ( $zone_query->have_posts() ) :
    while ( $zone_query->have_posts() ) : $zone_query->the_post();
        echo '<li>' . get_the_title() . '</li>';
    endwhile;
endif;
wp_reset_query();

Posts Array

$zone_posts = z_get_posts_in_zone( 'homepage' );
foreach ( $zone_posts as $zone_post ) :
    echo '<li>' . get_the_title( $zone_post->ID ) . '</li>';
endforeach;

FUNCTION REFERENCE

Get an array of all zones:

z_get_zones()

Get a single zone. Accepts either ID or slug.

z_get_zone( $zone )

Get an array of ordered posts in a given zone. Accepts either ID or slug.

z_get_posts_in_zone( $zone )

Get a WP_Query object for a given zone. Accepts either ID or slug.

z_get_zone_query( $zone );

More functions listed in functions.php

zoninator's People

Contributors

mjangda avatar ice9js avatar kingyes avatar pgk avatar jblz avatar bcampeau avatar andfinally avatar brettshumaker avatar jasonbahl avatar trepmal avatar sboisvert avatar david-binda avatar yolih avatar rebeccahum avatar mboynes avatar joshbetz avatar lpmi-13 avatar vhuynh617 avatar sjinks avatar szepeviktor avatar philipjohn avatar pkevan avatar nickdaugherty avatar maevelander avatar jessedyck avatar vaurdan avatar garyjones avatar davisshaver avatar dlh01 avatar attackant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.