ThemeShaper Forums » Thematic

[closed]

Styling a Filter Instance

(5 posts)
  • Started 12 years ago by soupking
  • Latest reply from lastraw
  • This topic is not resolved

Tags:

  1. soupking
    Member

    Hi Helga & Co.

    I have a searchform function which I guess is a filter. I found the function in widget-extensions.php but have no idea how to stylize that function filter/widget thing.

    Here's the instance:

    function searchbar(){ ?>
      <div id="menu-searchbar" class="aside main-aside-flush">
        <img src="http://axiom-media.com/work/fdb/wp-content/themes/feelingDodgerBlue/images/bgsearch.jpg" alt="<?php bloginfo('name');?>"
        <?php thematic_search_form();?>
      </div>
    <?php }
    add_action('thematic_abovemainasides','searchbar');

    Do I somehow insert a "class=something-I-made-up" into the <?php thematic_search_form();?> php string above?

    Is that how people approach styling PHP blog objects?

    Posted 12 years ago #
  2. You should be able to add styles in your child theme's style.css file to style the existing divs and classes, instead of adding new ones

    something like

    #menu-searchbar {
    padding-left 200px;
    }

    would keep all the default styles intact but move the the div over to the right 200px

    Posted 12 years ago #
  3. that isn't a filter. a filter is when you pass a variable back and thematic applies your value before it applies its own.

    anything in the thematic core that says apply_filters('filter_name', $variable) is a filter

    you have added a function to a hook.

    though i think you could filter the output of the thematic_search_form by running it through a preg_replace, but that is just more complicated than you need to be right now.

    and laststraw is right you can style your search by targeting it. adding the #menu-searchbar to your style rules will make any rule more specific and so it will take precedence over the existing rules.

    Posted 12 years ago #
  4. soupking
    Member

    Sorry, my question was really lame.

    I was really pertaining to the...

    <?php thematic_search_form();?>

    ...portion of the code. I should have been more to the point. I'm totally hip to CSS referencing with standard XHTML tagging. It's the importation of all the remote PHP modules.

    Like, I can go through Firebug and see the thing I'm supposed to reference, but as I'm trying to learn more about widgets and plugins, I'm having a hard time locating/identifying properties of these things to edit them.

    I've gone through the extensions folder, but I don't see sub-divisions of the page laid out in HTML. It's just more PHP. If I use the editor, it's PHP pages calling more PHP functions. Like, after a while I'm not even sure what I'm looking for as most dialog makes it seem almost obvious.

    I might have the wrong idea, do some more research and come back with a better question. I'm just so use to straight XHTML/CSS that the whole hook methodology is taking me a little while.

    Thanks a bunch for all your guys feedback. It's been a big help and means a lot to me and the guys I'm making this site for as a baseball fan.

    Posted 12 years ago #

  5. Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.