View 0_reuse_code.js
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View what-template-is-this.php
<?php //remove opening tag | |
add_action( 'wp_head', 'show_template' ); | |
function show_template() { | |
global $template; | |
print_r( $template ); | |
} |
View front-page.php
<?php | |
/** | |
* This file adds the Home Page to the Winning Agent Pro Theme. | |
* | |
* @author Carrie Dils | |
* @package Winning Agent Pro | |
* @subpackage Customizations | |
*/ |
View search-bar.php
<?php //remove opening php tag (this entire line) | |
// Add search widget below header | |
add_action( 'genesis_after_header', 'wap_search_bar' ); | |
function wap_search_bar() { | |
if ( ! is_front_page() ) { | |
return; | |
} | |
View office-hours-template.php
<?php | |
/** | |
* Template Name: Office Hours Template | |
* Description: Used as a page template to show page contents, followed by a loop | |
* through the "Genesis Office Hours" category | |
*/ | |
// Add our custom loop | |
add_action( 'genesis_loop', 'cd_goh_loop' ); |
View body-class-conditional.php
<?php //remove this line | |
function conditionl_widgets() { | |
$classes = get_body_class(); | |
// If body class doesn't include 'full-width-content', BOUNCE | |
if in_array( 'full-width-content', $classes) { | |
return; |
View Customize the Contact Info Fields in WordPress Profiles 6
// Customize the contact information fields available to users | |
add_filter( 'user_contactmethods', 'change_contact_info', 10, 1); | |
function change_contact_info( $contactmethods ) { | |
$contactmethods['website_title'] = 'Website Title'; | |
$contactmethods['twitter'] = 'Twitter'; | |
$contactmethods['facebook'] = 'Facebook'; | |
$contactmethods['linkedin'] = 'Linked In'; | |
return $contactmethods; |
OlderNewer