Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ededgert raises a good point, and one I completely agree with. Something I should address in my themes. I think the key is to leave the little options to the people and to not assume they want something one way or another. In my wp magazine theme I included 16 widget locations, which might be overkill, but no one says you have to use them. Widgets are simple and familiar to most WordPress users. No hacking of the code, nothing. Just slap a widget in there.

    I also included a try before you buy option, like demetris mentioned, so you can try it on your own content. Fair warning: I tried to add nag screens and lock it down for the demo only. While most PHP folks can probably undo the damage, I think people will appreciate the option and be honest.

    That being said, I really like platformate, it is lightweight, slightly new wave and readable. This is the direction that most themes and theme developers should move (especially for those cookie cutter magazine themes).

    One thing I did with some of my previous wordpress magazine themes is use a PHP output buffer to pull out the first img URL with code like this:

    function match($regex, $str, $i = 0) {
    	if(preg_match($regex, $str, $match) == 1)
    		return $match[$i];
    	else
    		return false;
    }
    
    function get_the_image_url() {
    	ob_start();
    	the_content();
    	$imgBeg = strpos(ob_get_contents(), '<img');
    	$imgStuff = substr(ob_get_contents(), $imgBeg);
    	ob_end_clean();
    	$imgEnd = strpos($imgStuff, '>');
    	$postImg = substr($imgStuff, 0, $imgEnd+1);
    	$url = match('/src="(.*?)" /msi', $postImg, 1);
    	return $url;
    }

    And then I like to use a PHP thumbnail image generator/cache. Just call the image within the loop:

    <a href="<?php the_permalink() ?>"><img class="thumb" src="<?php bloginfo('stylesheet_directory'); ?>/resize.php?src=<?php echo get_the_image_url(); ?>&amp;h=160&amp;w=160&amp;zc=1" height="160" width="160" alt="<?php the_title(); ?>"></img></a>

    That’s the way I do it. PS: the get_the_image_url() funtion had many more options, I just stripped them out for simplicity. It could use some refactoring

    Brian Gardner shortly tried out a GPL based theme thing where he allowed pretty much anyone to download his themes but get no support unless they payed. I dont’ think he made any money so he went back. If you do a Google for that query, I am sure you can find some magazine themes for WordPress. I remember Social Buzz had a great list.

    Here is the code I used for my magazine theme:

    <?php $recent = new WP_Query("cat=".get_cat_id('Name Of Category')."&showposts=5");
    while($recent->have_posts()) : $recent->the_post();?>
    
    	<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    	<small>Posted by <?php the_author_posts_link(); ?> on <?php the_time('M jS, Y'); ?> | <a href="<?php the_permalink() ?>#comments"><?php comments_number('0', '1', '%'); ?> Comments</a></small>
    	<?php the_excerpt('Read More-->'); ?>
    
    <?php endwhile; ?>

    Be careful to always use the $variable = new WP_Query(); while($variable->have_posts()) : $variable->the_post(); when possible, especially when there are multiple loops, just use a different variable name.

    Good luck!

    Revolution Pro is probably the most popular, by far. I am sure a quick search around will find you the best themes. You could always consider our wordpress magazine theme Magatheme, we’re always appreciative of any feedback.

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