Return to Support

title in topbar

Home Forums Graphene WordPress theme Support title in topbar

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2943
    Manasse
    Member

    Hey all, another question…

    Yes I know, I keep you guys busy and WP keeps me busy, so i got stuck again with something else… Getting closer to having a nice site, though!

    Anyway, I’m trying to put the site title in the top bar. There’s an action hook called “graphene_top_bar”

    Here’s the function code I tried (have put it in my child’s function.php:

    <?php function tws_title_topbar () {
    ?>
    <div id="tws_title"><twoway class="title">TwoWay</twoway><spatie class="title"> </spatie><society class="title">Society</society> </div><?php
    } add_action('graphene_top_bar', 'tws_title_topbar');

    ?>

    No errors, so i must have done something wright. Accidents DO happen or I’m just getting a bit better at this 🙂

    Here’s the Style.css

    #tws_title_topbar{
    .tws_title{
    font-family: impact;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0.1em 0.1em 0.05em #333;
    text-shadow: 0.1em 0.1em 0.2em black;
    word-spacing: 12px;
    border-style: outset;
    border-color: white;
    margin: 1px 2px 3px 4px;
    padding: 1px 2px 3px 4px;
    text-align: center;
    }
    title.twoway{
    color: red;
    letter-spacing: 3px;
    }
    title.spatie{
    letter-spacing: 5 px;
    }
    title.society{
    color: white;
    letter-spacing: 3px;
    }

    There might be a lot of unnecessary styling in there. I wanted to test some in Firebug and then get the best values…

    If you look at the site twowaysociety.nl/hidden/ you see that next to the social buttons there’s two words in gray. Is the original styling overwriting my own? And, of course, how can I resolve it???

    Cheers

    #22739
    Josh
    Member

    You’re thinking about it wrong.

    When you enable an action hook via the admin area, you are essentially creating a new widget area in that part of the code. So, you then go to your widget area and drag a new text or php widget to the new area.

    So, when you enable the graphene_top_bar action hook, you are also creating a graphene_top_bar widget area. You don’t need to add anything to your child theme functions file.

    Instead, go to your widget panel, and insert a new text or php widget into the graphene_top_bar widget area. Next, open that widget and insert your code.

    Lastly, you might have to fine-tune the positioning with some custom css.

    #22740
    Manasse
    Member

    Aha! I get it. Watched the ‘advanced’ tutorial and saw you do something with social buttons, so I thought this was kinda like the same… I’ll delete the function add the html-code in the “widget”-section and tweak around witch Firebug… Sounds like fun!

    Thanks again Josh!

    #22741
    Josh
    Member

    Haha… yeah, start simple… then move to the advanced 😉

    #22742
    Manasse
    Member

    Well. That’s a bummer. It’s still grey. So I think I get the PHP part right, but messing up the style.css. Should there be a # only before functions or also before every class ID (meaning the .tws_title, etc)??

    #22743
    Josh
    Member

    Try adding the !important attribute… like this:

    title.twoway{
    color: red !important;
    letter-spacing: 3px;
    }
    title.spatie{
    letter-spacing: 5 px;
    }
    title.society{
    color: white !important;
    letter-spacing: 3px;
    }

    #22744
    Manasse
    Member

    Ok. It’s still the same, but zooming in with Firebug, i found out that the color and the font comes from this:

    < body class="home blog logged-in admin-bar custom-background three-col-center three-columns">

    How can I manipulate this without doing to much damage?

    #22745
    Prasanna SP
    Member

    Hmm.. Using the same idea in my LOL site – http://letitsnow.in/

    The text Let It Snow In Your Browser!!! is placed in a graphene_top_bar widget and styled it something like this,

    #text-3 {
    padding-left: 130px;
    }

    And the widget content is more or less,

    <br />
    <strong>
    <h2>
    <a href="http://www.letitsnow.in">Let It Snow In Your Browser!!!</a>
    </h2>
    </strong>

    #22746
    Manasse
    Member

    Ok, found out what was going wrong. I wrote this in HTML <twoway class="title"> and in css I call title.twoway that should’ve been twoway.title;

    Oh well, got it fixed. A few more things (for now) and it’ll be perfect (till I want to change things, that is)

    Anyone now how to change the pages permalinks? If you go to band it displays “band” in the Navbar (perfect) and band in the sec.menu (perfect) but it shows band in the content part as well.. the code I found with Firebug (can’t mention that too many times :D) says this:

    <a href="http://twowaysociety.nl/hidden/band/" rel="bookmark" title="Permalink to Band">Band</a> I’d like to change the tekst in to Bio

    #22747
    Prasanna SP
    Member

    but it shows band in the content part as well..

    Edit page and change it’s title! (You can still have the same URL)

    #22748
    Manasse
    Member

    I’ve tried that, but don’t want to change it’s title. I want to change the permalink’s display. Hmmm.. Maybe I’ll try some conditional formatting here as well… Found this in the_loop.php:

    <?php /* Post title */
    $tag = (is_singular() && !is_front_page()) ? 'h1' : 'h2';
    echo '<'.$tag.' class="post-title entry-title">';
    ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a>
    <?php do_action('graphene_post_title'); ?>
    <?php echo '</'.$tag.'>'; ?>

    With my very limited PHP-skills I fugured out I should look for the {the_title}, which I can’t seem to locate. Does anyone know where to find it?

    #22749
    Prasanna SP
    Member

    Hmmm… Do you want to hide the page title? If so, it’s deadly simple. Just add this to your stylesheet or Custom CSS

    #post-9 h2 {
    display:none;
    }

    where #post-9 is the page id of the Bio page. It just hides the title of the Bio page. (I’m assuming that you want “Bio” title on title bar, nav bar and sec nav bar. But not to show up above the page)

    #22750
    Manasse
    Member

    I wanted to change the title, but not in the menu.. Forgot to mention that I found the solution in the admins page options. HA! Dead simple, true. Renamed the page Bio and in the Appearance->Menu I renamed the Navigation Label back into Band. That did the job! Sometimes i think in a difficult way, where things can be so damn easy… lol I tackled both issues today. There’s just one more thing… something with conditional formating… It rules, but my PHP is too limited…

    thanks again for the help…

    #22751
    Prasanna SP
    Member

    LOL.. This happens when we think every modifications should be done by hard coding.. Yeah! I’m the one who thinks like that (okay, most of the times..) 🙂

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.