ThemeShaper Forums » Thematic

[closed]

Customizing the site title

(11 posts)
  • Started 3 years ago by spn
  • Latest reply from steve.c
  • This topic is resolved
  1. spn
    Member

    I'm in the process of creating a blog using WordPress with the Thematic theme, let's say it's called 'FooBlog'. I want half the title to be bold, like this: FooBlog. Is there an easy way to do this?

    Posted 3 years ago #
  2. try using str_replace on the title

    function childtheme_override_blogtitle() { 
    
    		$title = get_bloginfo('name');
    		$title = str_replace('foo','<span class="foo">foo</span>',$title);
    ?>
    
    	    		<div id="blog-title"><span><a href="<?php bloginfo('url') ?>/" title="<?php bloginfo('name') ?>" rel="home"><?php echo $title; ?></a></span></div>
    
    	    <?php }
    	    add_action('thematic_header','childtheme_override_blogtitle',3);

    then style the class .foo in your stylesheet to look how you want

    Posted 3 years ago #
  3. spn
    Member

    That worked like a charm, thank you for quick and helpful info :)

    I have another issue now; I want 'Foo' to be red as default, but change to another color when I hover the mouse over it. This doesn't quite work with the following code, as it is stuck on the color red (even on mouseover). Any suggestions?

    .foo {
    font-family: 'Lobster', arial, serif;
    font-size:48px;
    /*font-weight:bold;*/
    line-height:40px;
    color:red;
    }
    .foo a {
    color:#FF4B33;
    text-decoration:none;
    }
    .foo a:active,
    .foo a:hover {
    color: #FF4B33;
    }

    Posted 3 years ago #
  4. i think you have your css backwards. there is no a link inside of class foo, but there is a class foo inside of the link... so i think this should work

    `
    a:hover .foo{
    color: #ff4b33;
    }

    Posted 3 years ago #
  5. spn
    Member

    Again, thank you! Got it to look exactly like I wanted :)

    Posted 3 years ago #
  6. neat. please mark as resolved.

    Posted 3 years ago #
  7. xave
    Member

    Note for dev:
    It appears that thematic 0.9.7.7 has minor errors with the new childtheme_override functions.
    Currently, the code below is in the if statement in the core header-extentions.php code: - add_action('thematic_header','thematic_blogtitle',3);
    This should be outside the if statements, otherwise we need to re-use the add_action on our custom childtheme_override functions. Please can this be fixed in next version (I use this extensively).

    I've also noticed that a custom function for
    function childtheme_override_post_class() {
    But in order to work, it needs to be:
    function childtheme_override_post_class($print = true) {

    Could a default be set in core code in next version..
    cheers

    Xavier

    Posted 3 years ago #
  8. Hi Xavier,

    Thanks for catching the blogtitle issue. Will be addressed in the svn shortly.

    As far as the post class override, the override functions are intended to be completely independent from the parent theme's original function. That is why there are no default parameters set for the overrides.

    This new feature is designed to check for the existence of an override function and if it exists to execute it in place of the parent function. There is shouldn't be anything stopping you from adding whatever parameters you wish to your override.

    If you are simply copying over the parent post class function into your override function, you cans define the function with the $print=true parameter of your choosing or you could adjust the function not to use that parameter and just use print($c); instead of using the ternary of the parent function.

    -Gene

    Posted 3 years ago #
  9. Hi Xavier,

    could you please check the latest SVN copy (revision 744). I found a few more override functions that were not covered by the according add_action() commands.

    Chris

    Posted 3 years ago #
  10. cmurockstar
    Member

    The add_action('thematic_header','thematic_brandingopen',1); and others are still within the if statements in the public build.

    Posted 3 years ago #
  11. steve.c
    Member

    This explains everything. Just installed thematic through WP and started trying to create a child theme and I was tearing my eyes out trying to figure out why the simple changes to my functions.php file werent working.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.