Jump to content
Sign in to follow this  
josh1178

Shortcode for 'boxes' and other sections

Recommended Posts

josh1178

Is there shortcode for boxes and other sections? If not, can I use a PHP Shortcode plugin to put a group of boxes somewhere using shortcode? The ultimate goal would be to achieve something like this portfolio: http://themetrust.com/demos/filtered/?page_id=73 They have custom post types called projects, which get filtered by category. I'd like to use boxes for 'projects'. I own that theme and could use the code there if there is a simple way to do it. I was thinking the easiest way would be with tab and shortcode inside the tabs. Tab 1 = Books [books Box Set Shortcode] Tab 2 = DVD [DVD Box Set Shortcode] Tab 3 = MP3s [MP3 Box Set Shortcode] Any help or guidance appreciated. Thanks.

Share this post


Link to post
Share on other sites
josh1178

Thanks Catrina. I read/watched the hook info, but I'm still not sure exactly how I'd get a box set into a shortcode. Can anyone provide a bit more detail on this or how to best setup tabs to display boxes. Thanks!

Share this post


Link to post
Share on other sites
ricardo

Josh, As far as I know, it's not possible to do it. I don't even think it's easily doable. Using boxes, you would still need to link to a post or page so I advise you to look into easier alternatives, either adapting a gallery display plugin or using a specific plugin. Ricardo

Share this post


Link to post
Share on other sites
josh1178

Thanks Ricardo. Are the boxes just custom posts? Do they use standard wordpress taxonomy? The ultimate goal would be to have something like this, but with box sets inside each tab that represent products: http://www.gethifi.com/blog/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours#docs These are instructions someone gave me to setup custom posts filtering. I know nothing about php, but am willing to try it out. Perhaps someone can tell me if I'm going in the wrong direction totally.

`What you need to do is first create an unordered list (UL) of the taxonomy terms. Each term will sit inside of an LI tag and each of these will be a tab. You can display the UL of terms like this:
	
	    <ul id="portfolio-filter" class="clearfix">
	
	<li><a href="#all">all</a></li>
			<?php
			$cats = get_terms('portfolio_tags');
			foreach ($cats as $cat ) : ?>
	
	<li><a>slug; ?>" rel="<?php echo $cat->slug; ?>"><?php echo $cat->name; ?></a></li>
			<?php endforeach; ?>
	
	Be sure to replace "portfolio_tags" with the name of your taxonomy.
	
	Then what you need to do is create the "display" portion of the page. This is another UL whose contents will be filled by your jquery filter plugin. The code that I used, which is all in the attached template file, looks like this:
	
	<ul id="portfolio-list">
	    <?php while (have_posts()) : the_post();
		$terms = get_the_terms ($post->id, 'portfolio_tags'); ?>
	
		<li class="portfolio-box one-column <?php foreach ($terms as $term) { echo $term->slug . ' '; } ?>">
	    	<span class="magnify"></span>
			<a>" title="<?php the_title('') ?>" rel="prettyPhoto[gallery]" class="opacity"><?php the_post_thumbnail('portfolio'); ?></a>
			<h2><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
			<?php echo get_post_meta($post->ID, 'ap_description', true); ?>
	
		<!-- END portfolio-box -->
	
	   <?php endwhile; ?>`
	

Share this post


Link to post
Share on other sites
josh1178

Thanks Ricardo. Are the boxes just custom posts? Do they use standard wordpress taxonomy? The ultimate goal would be to have something like this, but with box sets inside each tab that represent products: http://www.gethifi.com/blog/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours#docs These are instructions someone gave me to setup custom posts filtering. I know nothing about php, but am willing to try it out. Perhaps someone can tell me if I'm going in the wrong direction totally.

`What you need to do is first create an unordered list (UL) of the taxonomy terms. Each term will sit inside of an LI tag and each of these will be a tab. You can display the UL of terms like this:
	
	    <ul id="portfolio-filter" class="clearfix">
			<li><a href="#all">all</a></li>
			<?php
			$cats = get_terms('portfolio_tags');
			foreach ($cats as $cat ) : ?>
				<li><a href="#<?php echo $cat->slug; ?>" rel="<?php echo $cat->slug; ?>"><?php echo $cat->name; ?></a></li>
			<?php endforeach; ?>
		</ul>
	
	Be sure to replace "portfolio_tags" with the name of your taxonomy.
	
	Then what you need to do is create the "display" portion of the page. This is another UL whose contents will be filled by your jquery filter plugin. The code that I used, which is all in the attached template file, looks like this:
	
	<ul id="portfolio-list">
	    <?php while (have_posts()) : the_post();
		$terms = get_the_terms ($post->id, 'portfolio_tags'); ?>
	
		<li class="portfolio-box one-column <?php foreach ($terms as $term) { echo $term->slug . ' '; } ?>">
	    	<span class="magnify"></span>
			<a href="<?php echo $thumbnail[0]; ?>" title="<?php the_title('') ?>" rel="prettyPhoto[gallery]" class="opacity"><?php the_post_thumbnail('portfolio'); ?></a>
			<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
			<?php echo get_post_meta($post->ID, 'ap_description', true); ?>
		</li>
		<!-- END portfolio-box -->
	
	   <?php endwhile; ?>
	</ul>`

Share this post


Link to post
Share on other sites
ricardo

Josh, This is the same thing as your other thread with a slider inside the feature slider: the level of assistance you are seeking goes beyond what's doable through the forum. If it's not clear to you the complexity of what you are asking here, let me tell you that I wouldn't do this for myself, I would do the most cost-effective solution and that is: adapt a gallery display plugin or use a specific plugin for this, following the same advice I gave you before. If you really want to do this, then I advise you to hire someone from the Pros. Ricardo

Share this post


Link to post
Share on other sites
josh1178

Thanks Ricardo, I appreciate your honest advice. The problem with plugin solutions is I find in the end they slow things down and you end up managing a bunch of online code. Platform is so modular, it seemed like the kind of thing you could do. Perhaps I'll need to hire a pro. I think Pagelines should start something like code canyon and sell sections and page templates to their users as add ons. The problem with a pro is price, time and the lack of a quality guarantee. My two cents...I'll post if I find a solution or pay for one. Thanks again for your time though ricardo!

Share this post


Link to post
Share on other sites
cmunns

Josh contact me...adam[at]pagelines.com I have something that will help you...the example you provided uses the jquery masonry plugin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×