ThemeShaper Forums » Thematic


functions.php needs a little help

(1 post)
  • Started 10 years ago by TannerM
  • This topic is not resolved
  1. Hi all -

    I'm going to post in my functions file - i think there may be a few issues with it, everything seems to be working well but i recently tried to add the headspace 2 functionality to it,

    and all it does is remove all my page titles, even if i have them setup in HS2.
    If feel like the culprit may be some improper code in my functions.php - thanks ahead of time for taking a look... I love thematic and have been using it for all my client projects, now i just need to learn a bit of php to make sense of function coding.

    //  Custom Child Theme Functions
    // I've included a "commented out" sample function below that'll add a home link to your menu
    // More ideas can be found on "A Guide To Customizing The Thematic Theme Framework"
    // Adds a home link to your menu
    //function childtheme_menu_args($args) {
    //    $args = array(
    //        'show_home' => 'Home',
    //        'sort_column' => 'menu_order',
    //        'menu_class' => 'menu',
    //        'echo' => true
    //    );
    //	return $args;
    // This will create your widget area
    function my_widgets_init() {
           	'name' => 'Header Aside',
           	'id' => 'header-aside',
           	'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
           	'after_widget' => "",
    		'before_title' => "<h3 class=\"widgettitle\">",
    		'after_title' => "</h3>\n",
    add_action( 'init', 'my_widgets_init' );
    // adding the widget area to your child theme
    function my_header_widgets() {
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside') ) {
        echo '<div id="header-aside" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
        echo '' . "\n" . '  </li></ul></div><!-- #header-aside .aside -->'. "\n";
    add_action('thematic_header', 'my_header_widgets', 8);
    // we're removing the standard blog title and blog description
    function new_header() {
    add_action('init', 'new_header');
    // and now we're creating a new blog title
    function my_blogtitle() { ?>
    <div id="blog-title"><span><a href="<?php echo get_option('home') ?>/" title="<?php bloginfo('name') ?>"><img src="<?php echo bloginfo('stylesheet_directory') ?>/images/logo.png" alt="<?php bloginfo('name') ?>" /></a></span></div>
    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.