GithubHelp home page GithubHelp logo

theperfectwill / enlighten Goto Github PK

View Code? Open in Web Editor NEW

This project forked from funkjedi/enlighten

0.0 1.0 0.0 660 KB

Wordpress optimizations and useful template tags and shortcodes; Apologies for the mess... honestly I do plan to clean things up a bit... eventually.

PHP 100.00%

enlighten's Introduction

Enlighten

Enlighten is a collection of Wordpress optimizations, useful template tags, and shortcodes. It includes a modified version of the cleanup optimizations from Roots Theme.

Hooks into wp_enqueue_style allowing automatic compilation of SCSS files. Compiled stylesheets are saved to the Wordpress uploads directory.

Template Tags

the_content_from($page /* ID, slug or title */, $suppress_filters = false)
get_template_part_for($slug, [$name = '',] $args)

The enlighten_loop template tag emulates a WP_Query style loop. It has a couple advantages over using a WP_Query object directly though. Most noticeably the ability to easily place an existing array of posts into a loop.

// Possible arguments are: a WP_Query object, WP_Query args or an array of posts
$loop = enlighten_loop(array(
  'post_type' => 'events',
  'no_paging' => true,
  'meta_key'  => 'date',
  'orderby'   => 'meta_value',
  'order'     => 'DESC'
));

while ($loop->have_posts()) : $loop->the_post();
  the_content();
endwhile;
add_post_thumbnail($name, $id, $post_types = array('page', 'post'))
has_post_thumbnail_src($multi_post_thumbnail = '')
the_post_thumbnail_src($size = 'full', $background_image = false, $multi_post_thumbnail = '')

Current Version:0.1.3

enlighten's People

Contributors

funkjedi avatar

Watchers

 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.