Giter VIP home page Giter VIP logo

gw-accordion-cat's Introduction

GW Accorian Cat

Description

This Wordpress plugin allows a user to create an accordion display of categories and posts using a short tag on their page or post.

Setup

create a posts category that will be used as the parent for all categories in the display. It there is a different accordion for different pages, you will want to create a separate categories for each page.

Place subcategories under the created parent. These will be the different accordion sections

Attach posts to the proper categories in the accordions.

Short Tag

[accordioncat cat="parent_category"]

Required Parameters

cat - contains the slug for the parent category

Optional Parameters

startingcat - the slug of the category that will start up open on the first load. The default is all closed.

sortorder - this can be any of the following category fields: 'id', 'name', 'slug', 'count', 'term_group'. Default is 'slug' .

order - 'asc' for acceding order or 'desc' for descending order. Default is 'asc'.

hideposttitle - Hides the post title. Valid values are 'yes' and 'no'. Default is 'no'.

debug - if set to "true" will dump the entire accordion data structure. to the page (all category and post object elements)

Examples

To create an accordion with a parent category of 'mystuff' that starts with the sub-category 'openingcat' open, use:

[accordioncat cat="parent_category" startingcat="openingcat"]

To create an accordion with a parent category of 'mystuff' that starts with the sub-category 'openingcat' open and is sorted by name, use:

[accordioncat cat="parent_category" startingcat="openingcat" sortorder="name"]

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.