Skip to content

Instantly share code, notes, and snippets.

View BoweFrankema's full-sized avatar

Bowe Frankema BoweFrankema

View GitHub Profile
@BoweFrankema
BoweFrankema / Pagination Example
Created January 30, 2012 18:28
Wrap your custom code and turn them into Theme Features
if ( current_theme_supports( 'infinity-pagination' ) )
{
/**
* Add Pagination
*
* @package Infinity
* @subpackage base
* @todo write a paginator from scratch, this is mental
*/
function infinity_base_paginate() {
@BoweFrankema
BoweFrankema / Infinity Snippet - Different Menu for Visitors
Created August 1, 2012 13:03
Show different menu for visitors for Infinity
<?php
/**
* Infinity Theme: main menu template
*
* @author Bowe Frankema <bowe@presscrew.com>
* @link http://infinity.presscrew.com/
* @copyright Copyright (C) 2010-2011 Bowe Frankema
* @license http://www.gnu.org/licenses/gpl.html GPLv2 or later
* @package Infinity
* @subpackage templates
@BoweFrankema
BoweFrankema / option-types.md
Created November 9, 2012 15:47
Infinity Option Types
  • Basic
    • text - Text input
    • textarea Text area input
    • select - Select box
    • radio - Radio buttons
    • checkbox - Check boxes
    • css - Custom CSS textarea
  • Dynamic
    • category - Select one category
    • categories - Select multiple categories
@BoweFrankema
BoweFrankema / features-example.ini
Created November 17, 2012 16:54
Creating a Feature in Features.ini for an Infinity Theme
[infinity-typography-style]
type = "default"
title = "Typography Styles"
description = "The base Typography"
style = "assets/css/typography.css"
@BoweFrankema
BoweFrankema / Options: field selection (select)
Created November 17, 2012 17:00
Create a new theme option with several field options to choose from
[my-sidebar-size]
section = "sidebar"
title = "Sidebar Size"
description = "Select a sidebar size"
type = "select"
default_value = "eleven"
field_options[] = "fourteen=15 percent"
field_options[] = "thirteen=20 percent"
field_options[] = "twelve=25 percent"
field_options[] = "eleven=30 precent"
@BoweFrankema
BoweFrankema / Options: Add Color Picker
Created November 17, 2012 17:02
Create a color picker Theme Options through options.ini
[my-color-picker]
type = "colorpicker"
title = "Text Color"
description = "Choose a text color"
style_selector = "body"
default_value = "#444"
style_property = "color"
@BoweFrankema
BoweFrankema / Options: Text Area with Default text
Created November 17, 2012 17:03
Create a text area theme option with default value
[my-text-area]
section = "footer"
title = "Footer Text"
description = "Your footer copyright text"
default_value = "Infinity by <a href=http://infinity.presscrew.com>PressCrew</a> and powered by <a href=http://wordpress.org>WordPress</a>."
type = "textarea"
@BoweFrankema
BoweFrankema / Options: Custom CSS
Created November 17, 2012 17:07
Create a custom CSS Theme Option
[my-custom-css]
section = "global"
type = "css/custom"
title = "Custom CSS"
description = "Enter custom CSS markup to fine tune the look of your site"
@BoweFrankema
BoweFrankema / Options: jQuery UI Slider in Pixels
Created November 17, 2012 17:09
Create a jQuery UI Slider Theme Option
[my-custom-slider]
section = "global"
type = "css/length-px"
title = "Width"
description = "Select the width of the site's content by moving the slider"
min = 900
max = 1250
step = 10
style_selector = "#wrapper"
style_property = "max-width"
@BoweFrankema
BoweFrankema / Infinity.ini Enqueque CSS Style on front-end
Created November 17, 2012 17:16
Enqueue a CSS style through infinity.ini
[style]
;name stylesheet and location to path relative to theme folder
my-custom-css = "assets/css/my-custom-css"
[style_conditions]
;enqueue this style anywhere except the admin
is_not_admin = "my-custom-css"