Skip to content

Instantly share code, notes, and snippets.

@JeremyEnglert
Last active April 24, 2016 18:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JeremyEnglert/22bab1edc25e5a7d4eeb to your computer and use it in GitHub Desktop.
Save JeremyEnglert/22bab1edc25e5a7d4eeb to your computer and use it in GitHub Desktop.
Use an "Accordion Archive" with JointsWP
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="row">
<main id="main" class="large-8 medium-8 columns" role="main">
<ul class="accordion" data-accordion role="tablist">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li class="accordion-item">
<a href="#panel-<?php the_ID(); ?>" role="tab" class="accordion-title" id="panel-<?php the_ID(); ?>-label" aria-controls="panel-<?php the_ID(); ?>"><?php the_title(); ?></a>
<div id="panel-<?php the_ID(); ?>" class="accordion-content" role="tabpanel" data-tab-content aria-labelledby="panel-<?php the_ID(); ?>-label">
<?php get_template_part( 'parts/content', 'byline' ); ?>
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('full'); ?></a>
<?php the_content('<button class="tiny">Read more...</button>'); ?>
</div>
</li>
<?php endwhile; ?>
</ul>
<?php joints_page_navi(); ?>
<?php else : ?>
<?php get_template_part( 'parts/content', 'missing' ); ?>
<?php endif; ?>
</main> <!-- end #main -->
<?php get_sidebar(); ?>
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>
Copy link

ghost commented Dec 17, 2015

Awesome Jeremy! You Rock!

Copy link

ghost commented Dec 18, 2015

Hey Jeremy... so I switched back to calling the .min file instead of full, and this template/code is giving me this error... I thought it might just be my intermediate coding skills with the customizations, but I tested without it, and still got the error...

screen shot 2015-12-18 at 11 38 10 am

Copy link

ghost commented Dec 18, 2015

P.S. I tested again with the full foundation.js call, and no error... changed back to foundation.min.js, and got the error... plus when I just press the Command button it gives me these errors...

screen shot 2015-12-18 at 11 50 05 am

I know your busy... just a heads up... I am just going to switch back to using the full f.js call for this project...

@JeremyEnglert
Copy link
Author

Note for anyone else who runs into the above issue, it can be resolved by updating Foundation. The original 6.0 release had some bugs with minified files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment