jonwolfe
Forum Replies Created
-
Forum: Your WordPress
In reply to: WP as a CMS for a newsletter siteCongratulations. I also found WordPress easy to use as a CMS on the non-blog portions of kolossus.com using the Pages functionality and the ability to slice up pieces of HTML into as many templates as I like.
Forum: Your WordPress
In reply to: Please help with my student siteHi. I like the theme you’ve chosen, but I wonder about all those social bookmarking icons… I’ve debated about the pros and cons of those on my own site.
With so many icons, they detract from your design, and I think people tend to just scan past them, even if they use the sites you have icons for. As a Digg and delicious user, if I want to save something, I tend to just click my own browser bookmarklet, even if a blog post has social bookmarking buttons.
What about something like Alex King’s “share this” icon? I’m considering using this on my own site.
Forum: Your WordPress
In reply to: Your opinions pleaseHi. I agree that the layout is a bit crowded, and I think it hurts the readability that you can see the diagonal lines behind the text, especially in the sidebar areas where they’re more visible.
Forum: Your WordPress
In reply to: Very Very WhiteHi. I personally like the typography and layout of the posts, but I think the borders are a bit overdone — maybe colored background boxes instead?
Forum: Developing with WordPress
In reply to: Including content on _only_ the blog homepage page?I just posted an article that summarizes this issue and my technique for getting conditional content only on my blog homepage:
http://www.kolossus.com/wordpress/wordpress-tip-homepage-only-content
If anyone has any feedback about how to do this with just built-in WordPress functionality, that’d be great.
Forum: Developing with WordPress
In reply to: Including content on _only_ the blog homepage page?I figured out a solution, and I’m posting it here in case someone else needs to do something similar with their blog.
I figured out I could access part of the PHP global variable $_SERVER, specifically $_SERVER[‘REQUEST_URI’], and compare that to my blog’s homepage url. If they are the same, I include my custom header template with the special content I want to appear _only_ on the homepage, else I include the standard header template for my blog theme.
Why is this better than querying the wordpress function is_home()? Because is_home() returns true even when you page through your older entries. My technique allows you to include custom content on your blog’s frontpage and _only_ on the frontpage.
Here’s the code:
<?php $request_loc = 'http://www.yourdomainname.com'; $request_loc .= $_SERVER['REQUEST_URI']; $blog_loc = get_bloginfo('url'); $blog_loc .= '/'; //wordpress seems to not allow trailing slashes on the blog url variable if ( $request_loc == $blog_loc ) { include (TEMPLATEPATH . '/your_custom_template.php'); } else { get_header(); //include the standard header } ?>Forum: Developing with WordPress
In reply to: Including content on _only_ the blog homepage page?Thanks for the suggestion. I looked up Adhesive, but I don’t think it has the functionality I’m looking for — rather than make a certain post always appear on the blog homepage, I need to conditionally include a bit of html that’s outside of the posts loop, but _only_ if the current page is the actual blog homepage, not “/page/2″, /page/3”, etc. If there was a conditional tag such as “is_blog_homepage()” (or an equivalent variable I could access in PHP) that’d be ideal…
I suppose I could use javascript to look at the document’s location and if it’s the site root, then document.write() in what I need. However, I’d rather have this logic on the server side.
Forum: Developing with WordPress
In reply to: Including content on _only_ the blog homepage page?Hi, thanks for the reply. To answer your question, no, I’m not doing anything special in the organization of my pages.
The thing is, is_home() returns true whether you go to ‘/’, ‘/index.php’, ‘/page/1’, or ‘/page/2/’. I wish it only returned true for ‘/’ or ‘/index.php’.
You can test this for yourself by putting the following code into your header template:
<?php if (is_home()) { echo 'is_home() returned true'; } else { echo 'is_home() returned false'; } ?>