Forums

HELP with browse page options (5 posts)

  1. puppethorse
    Member
    Posted 3 years ago #

    Hi there, I would like to add a separate Browse page to my SCROLLABLE blog http://www.puppethorse.com/blog which would display a photo grid/mosaic of photos I have posted (like this example from pixelpost: http://theworldin35mm.org/browse/1 ).

    I have been searching the plugins on wordpress for something similar but no luck so far, what key words would describe wordpress's equivalent of a photo mosaic browse page?? And....is this even possible?

    Thank you in advance for your advice and time!

  2. tomontoast
    Member
    Posted 3 years ago #

    That is certainly possible with a plugin. You can contact me at my website if you wish to commission such a plugin.

  3. puppethorse
    Member
    Posted 3 years ago #

    Thanks for your reply! Unfortunately I am unable to commission you--I was hoping there was a free plugin already in wordpress directory and that I am just not using the right key words to find it. Thanks for your help!!

  4. tomontoast
    Member
    Posted 3 years ago #

    I suppose you could also do this using a theme.
    Create a new page called browse.
    In your theme's functions.php put the following code:

    function mosaic_shortcode($atts) {
    	global $post;
    	$old = $post;
    	extract(shortcode_atts(array('category' => '','show' => 16), $atts));
    	$show=intval($show);
    	$mosaic= new WP_Query();
    	$mosaic->query('showposts='.$show.'&cat='.$category);
    	$html='<div id="mosaic">';
    	while($mosaic->have_posts()) : $mosaic->the_post();
     	$image = get_post_meta($post->ID, 'image', $single = true);
    	if (!empty($image)){
    	$html.='<div class="mosaic-item">
    	<a href="'.get_permalink().'" rel="bookmark" title="Permanent Link to '.the_title('','',false).'"><img src="'.$image.'" alt="'.the_title().'" /></a>
    </div>';
    	}
    	endwhile;
    	$post = $old;
    	return $html;
    }
    add_shortcode('mosaic', 'mosaic_shortcode');

    Then on the browse page put whatever text you want and the shortcode: [mosaic] This will display the 16 most recent posts as long as you put the url of the image thumbnail in the meta field called image for each post.

  5. puppethorse
    Member
    Posted 3 years ago #

    Wow, thank you Tomontoast, that is very kind of you to reply with the above suggestion! I will be sure to try it out--thank you again!!!

Topic Closed

This topic has been closed to new replies.

About this Topic