Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter thisismyurl

    (@thisismyurl)

    Thanks Joni

    I absolutely love the roll overs on the menu text, how’d you do that?

    OK, there’s a couple quick things I’d like to recommend.

    First, you’ve hosted the site in the /blog/ directory. Is there a reason for this? I see a lot of people do this and I’m just curious.

    Secondly, surfing the site on a laptop the grey tends to be a little light. It looks fine on my PC but on a MacBook LCD screen the menu is a little hard to read.

    Chris

    Hey there, great work but I think you might want to increase the width of your first text box to match the width of the slideshow above it. Right now it’s about 50px narrow on Safari.

    Thread Starter thisismyurl

    (@thisismyurl)

    Thanks, we had changed the artwork a little but hadn’t uploaded the logo fix (until now). Thanks for the link as well, I hadn’t come across them before.

    <?php echo $post->post_name; ?>

    The code above will return the current slug for the page or post, that way you can add images such as img-post-name.jpg to your directory.

    You may also want to use a file_exist command, that way if the image file is not present you can always display a default image.

    If I understand what you’re looking for correctly, <?php echo $post->post_name; ?> should do it.

    If you load the content into a string using the get_the_content function, you’ll be able to insert the AdSense code any where you’d like by determining where you want it and simply pasting the code.

    For example:

    $code = '
    <script type="text/javascript"><!--
    google_ad_client = "pub-9144171931162286";
    /* 300x250, created 8/10/08 */
    google_ad_slot = "0878512762";
    google_ad_width = 300;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    ';
    $text = get_the_content();
    $text = substr_replace($text, "<p>", $code."<p>");
    echo $text;

    This example will insert your AdSense code ($code) into the content of your post ($text) at the beginning of each paragraph by replacing the <p> with $code<p>.

    Depending upon where you’d like the code to actually appear, you’ll have to modify the substr_replace command. One way to easily accomplish what you’d like is to include a special tag in the post where you want the ad to appear and then replace it with the substr_replace command.

Viewing 7 replies - 1 through 7 (of 7 total)