Viewing 15 replies - 1 through 15 (of 21 total)
  • artitumis,
    I use the following code on my site (https://www.tim-weston.com/) for page titles. Here’s the code I use; if it is similar to want you want feel free to use/modify it.
    <?php
    if ($single) {
    // if it is a page with a single post
    ?>
    <title><?php the_title(); ?> (tim-weston.com)</title>
    <?php
    } elseif ($cat) {
    // if it is a page of all posts in a given category
    ?>
    <title>tim-weston.com - <?php single_cat_title('', display); ?></title>
    <?php
    } else {
    // all other pages; I haven't found a variable for date-based archives
    ?>
    <title>tim-weston.com</title>
    <?php
    }
    ?>

    Thread Starter artitumis

    (@artitumis)

    Maybe I should have explained this a little better. Nice titles is a script that pulls up an image with link text in it. If you look at my main page and hover over some of the links, you’ll see what I mean.
    https://www.artitumis.com

    It looks like you’re doing the same thing Brad Choate is doing at https://www.bradchoate.com/ I’ve e-mailed him about things in the past, so I’m sure he’d be willing to help you out.

    : )
    well, that would be the simplest of all wouldn’t it?
    my mind is a swamp.
    f.

    Thread Starter artitumis

    (@artitumis)

    How do I make the link absolute? I’m still rather new to this.

    instead of something like url (happy-town.php) 0r href (party-pants.php) you want your link to reflect the complete address: https://www.domainish.com/secretfolder/happy-link.css
    now it points absolutely to one single, not relative, location.
    : )

    Thread Starter artitumis

    (@artitumis)

    Now I feel stupid! I should have understood that is what you meant. Thank you to both Beel and dss. You two are great.
    Now another question related to this for you two. When you add a link from the admin console, how can you also give it a title so it looks the same as the rest of the links on the page?

    In the Link Manager, fill in the short description.

    Thread Starter artitumis

    (@artitumis)

    Ah, okay. Now, instead of it putting the description in the title of link and under the link, how could you just make it show in the title?

    In the link manages, you could try adding the code for a “title” in the link name and see what happens.
    it works with images, why wouldn’t it work with a title?
    check it out, and let us know if that works.
    f.

    Thread Starter artitumis

    (@artitumis)

    Tried both in URI and in name but both of them failed. I am guessing I have to edit the way it calls links. I looked in index.php and I didn’t really see a way to do it. It must be in wp-links-opml.php. I don’t dare try to alter it with my very limited knowledge of php.

    you’re right.
    i tried it too, and it’s a no go.
    i suppose you could hand code your links into the sidebar and then include the sidebar with the include tag so it shows up everywhere you want it to.
    that’s the right now method i would probably end up using…
    but yes, the right thing to do would be to examine how wp outputs the links and maybe even create a back end input area for your titles.
    f.

    What are you dudes going on about? The short description is set in the link as title=”the short description” regardless of whether you choose to also show it “below the link” Those are two different issues/options.

    Beel:
    lucky you…
    i’ve got:
    URI: (the address of the link)
    Link Name: (the name of the link)
    Short description: (appears as added (and stylistically unwanted) text in the sidebar)
    Category: (drop down menu)
    but nowhere to include a title="blah" tag
    please enlighten us!

    Thread Starter artitumis

    (@artitumis)

    Yes, that is true but I don’t want that extra line of text below the link. I want it as a title only.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Nice titles on all pages’ is closed to new replies.