Git Product home page Git Product logo

issuer's Introduction

issuer

Wordpress Issue Management Plugin Adds an "Issue" taxonomy to your wordpress, so that you can filter posts by an issue. It also lets you set the current issue, for display on the home screen.

##For the Home Page

To get the current issue either wrap your existing query in current_issue()

$query = new WP_Query(current_issue(array("posts_to_show" => 20)));

Or just use it straight if you have no existing query.

$query = new WP_Query(current_issue());

##For the taxonomy/archive pages

There exists a function get_issue which returns the appropriate query.

get_issue([$query, $issue_name, $issue_number]);

Wrap your query in the same way with get_issue(). Pass empty args where necessary.

// for the taxonomy / archive page
$query = new WP_Query(get_issue());

// by name
$query = new WP_Query(get_issue('', "issue 1"));

// by id
$query = new WP_Query(get_issue('', '', 1));

##Listing Issues

list_issues($limit, $orderby, $order);

a $limit of 0 returns all issues, $orderby lets you specify term fields such as term_id, name, etc, and $order lets you specify ASC or DESC.

This returns an <ul class="issues-list"> with each element being a link contained in <li class="issue-item"><a href='issue-link'>issue-name</a></li>.

##Permalink Rewrite

You can use %issue% in the post permalink to insert the issue slug. But don't put this at the root, put something else there first, because wordpress has a bug that will break pages if you try put this custom permalink directly at the root.

##Hiding Issues

The plugin allows you to hide issues also. To check if an issue is disabled just check if its ID is in the array returned by get_option("exclude_issues").

if (in_array(get_option("exclude_issues"))) {
  echo "Issue hidden";
}

##Manual

You can operate manually also instead of using the included helpers, what this plugin does is it registers a taxonomy called issue and creates an option called current_issue which stores the ID of the current wordpress issue.

##Custom Ordering If you want to be able to custom order your issues, I recommend the excellent plugin by Zack Trollman called Custom Taxonomy Sort. You can pass "custom_sort" as the second argument to list_issues().

issuer's People

Contributors

lingz avatar

Stargazers

Nicolas Dedual avatar

Watchers

James Cloos avatar  avatar  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.