Skip to content

Instantly share code, notes, and snippets.

@thatwebguy
thatwebguy / front-page.php
Created June 2, 2015 17:06
the working page
<?php
/*
Handles the front page layout
*/
function home_slider() { ?>
<div id="amslider">
<?php if ( function_exists( 'soliloquy' ) ) { soliloquy( '43' ); } ?>
</div>
@thatwebguy
thatwebguy / combined-posts.php
Last active August 29, 2015 14:22
Combined posts
<?php
/**
* Template Name: Homepage test
*/
function home_slider() { ?>
<div id="amslider">
<?php if ( function_exists( 'soliloquy' ) ) { soliloquy( '43' ); } ?>
</div>
<?php }
<?php
/**
* Template Name: All the Numerals
* Description: template for the numerals page
*/
function amcs_numgrid() {
$args = array(
'post_type' => 'numeral', // enter your custom post type
@thatwebguy
thatwebguy / gist:8335405
Last active March 3, 2017 17:07
Change the banner custom background in Beautiful Pro Wordpress theme to use featured image
<?php
// Adding option to use featured image (if it exists)
// in place of background image
remove_action( 'genesis_after_header', 'beautiful_site_header_banner'); // removes existing banner image
add_image_size( 'featured-banner', 2000, 200, TRUE ); // creates a featured image size for the banner
function amcs_featured_img() {
@thatwebguy
thatwebguy / page_blog.php
Created December 9, 2013 17:36
Trying to make a custom post archive that sits under the page content for this site here http://www.mydailycocktails.com/ Seem instead to have created in infinite loop...
<?php
/*
Template Name: blog page v1
*/
get_header(); ?>
<?php if(get_post_meta($post->ID, 'ace_wide', true)) { echo '<section class="section-wide" role="main">'; } else { echo '<section class="section" role="main">'; } ?>
<?php echo ace_breadcrumb(); ?>
@thatwebguy
thatwebguy / single-artists.php
Created September 18, 2013 11:35
Finally got it doing what I wanted like this. Think where I went wrong was that previous sites I'd built with this company called functions into 'genesis_loop' in front-page.php. I assumed I could do that with any page. obviously not!
<?php
/** remove_action('genesis_loop','genesis_do_loop'); **/
function amcs_artists_featuredimg() { ?><div id="artist-img"><?php
if ( has_post_thumbnail() )
the_post_thumbnail( 'full size' ); ?></div>
<?php }
function amcs_artists_about() { ?>