Forum Replies Created
-
AuthorPosts
-
ParkPushMember
That's weird. The 's were removed when I pasted. Line 22 is;
echo ‘’;
ParkPushMemberAny particular reason this would break?
The error reads;Parse error: syntax error, unexpected T_ECHO in /home/toughman/public_html/wp-content/themes/switch/functions.php on line 22
<?php
// Start the engine
require_once( get_template_directory() . '/lib/init.php' );// Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Switch' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );// Add Viewport meta tag for mobile browsers
add_action( 'genesis_meta', 'sample_viewport_meta_tag' );
function sample_viewport_meta_tag() {
echo '';
}// Adding full width structure
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );/** Add featured image above single posts */
add_action( 'genesis_before_post_content', 'cd_featured_image' );
function cd_featured_image() {
if ( is_single() && has_post_thumbnail() ){
echo '';
echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail-size');
echo '';
}
}// Add support for custom background
add_theme_support( 'custom-background' );// Add support for custom header
add_theme_support( 'genesis-custom-header', array(
'width' => 1152,
'height' => 120
) );/** Reposition header outside main wrap */
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ) ;add_action( 'genesis_before', 'genesis_header_markup_open', 5 );
add_action( 'genesis_before', 'genesis_do_header' );
add_action( 'genesis_before', 'genesis_header_markup_close', 15 );// Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );add_filter( 'author_link', 'my_author_link' );
function my_author_link() {
return home_url( 'about/' );
}/** Register widget areas WELCOME */
genesis_register_sidebar( array(
'id' => 'welcome-text',
'name' => __( 'Welcome Text', 'genesis' ),
'description' => __( 'This is the welcome text widget.', 'themename' ),
) );/** Add the welcome text section */
add_action( 'genesis_after_header', 'custom_welcome_text' );
function custom_welcome_text() {
genesis_widget_area( 'welcome-text', array(
'before' => '',
) );
}/** Register widget areas PAGE TOP */
genesis_register_sidebar( array(
'id' => 'page-top',
'name' => __( 'Page Top', 'genesis' ),
'description' => __( 'This is the page top text widget.', 'switch' ),
) );/** Add the welcome text section */
add_action( 'genesis_before_content_sidebar_wrap', 'custom_page_top' );
function custom_page_top() {
genesis_widget_area( 'page-top', array(
'before' => '',
) );
}/** Register widget areas PAGE BOTTOM */
genesis_register_sidebar( array(
'id' => 'page-bottom',
'name' => __( 'Page Bottom', 'genesis' ),
'description' => __( 'Add content here to go below page/post content.', 'themename' ),
) );/** Add the page bottom section */
add_action( 'genesis_after_loop', 'custom_page_bottom' );
function custom_page_bottom() {
genesis_widget_area( 'page-bottom', array(
'before' => '',
) );
}// Reposition the Primary Navigation
// remove_action(‘genesis_after_header’, ‘genesis_do_nav’);
// add_action(‘genesis_before_header’, ‘genesis_do_nav’);// Reposition the Secondary navigation menu */
// remove_action( 'genesis_after_header', 'genesis_do_subnav' );
// add_action( 'genesis_before', 'genesis_do_subnav' );/*------
function custom_author_post_avatar_teaser(){
if( is_home() ){
if( get_query_var( 'author_name' ) ){
$curauth = get_userdatabylogin( get_query_var( 'author_name' ) );
}else{
$curauth = get_userdata( get_query_var( 'author' ) );
}
?><? echo "".get_avatar( get_the_author_email(), '24' ).""; ?>
Placeholder Text
//binding to the load field settings event to initialize the checkbox
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
jQuery("#field_placeholder").val(field["placeholder"]);
});jQuery(function(){
$field){/* Check if the field has an assigned placeholder */
if(isset($field['placeholder']) && !empty($field['placeholder'])){
/* If a placeholder text exists, inject it as a new property to the field using jQuery */
?>
jQuery('#input__').attr('placeholder','');
});
<?php
}
-
AuthorPosts