Title: Barebones theme missing important code
Last modified: August 21, 2016

---

# Barebones theme missing important code

 *  Resolved [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/)
 * Howdy all.
 * I’ve created an internal WordPress site which has no extra baggage. All the code
   has been stripped; with the focus on speed.
 * [Layout/screenshot of site](http://i.imgur.com/goBF6FX.jpg).
 * I added these lines manually to the header:
 *     ```
       <link id="collapseomatic-css-css" media="all" type="text/css" href="http://ccc/wp-content/plugins/jquery-collapse-o-matic/light_style.css?ver=1.5.2" rel="stylesheet">
       <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js?ver=3.6" type="text/javascript"></script>
       <script src="http://ccc/wp-content/plugins/jquery-collapse-o-matic/js/collapse.js?ver=1.5.2" type="text/javascript"></script>
       ```
   
 * As you can see in the attached screenshot, the collapse doesn’t fully work. It
   is expanded and can not be collapsed.
 * Code from **Test** post (in screenshot):
 *     ```
       <span id="id3733" class="collapseomatic " title="Lire">Lire</span>
       <div id="target-id3733" class="collapseomatic_content ">Conteu</div>
       ```
   
 * The div which is meant to be hidden……isn’t.
 * **single.php:**
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       	<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
       		<h2 class="post-h2"><?php the_title(); ?></h2>
       		<div class="entry">
       			<?php the_content(); ?>
       			<?php $posttags = get_the_tags();
       				if ($posttags) {
       					echo "<b>Tags:</b> ";
       					foreach($posttags as $tag) {
       						echo "<a href=\"javascript:ajaxpage('http://ccc/tag/$tag->name', 'contentlinks');\">$tag->name</a>, ";
       					}
       				} ?>
       		</div>
       	</div>
       <?php endwhile; endif; ?>
       ```
   
 * Single is used for the right pane.
 * I’m struggling to find what missing.
 * Thanks,
    Dylan.
 * [http://wordpress.org/plugins/jquery-collapse-o-matic/](http://wordpress.org/plugins/jquery-collapse-o-matic/)

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

 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010919)
 * This is bad, bad, bad:
 *     ```
       <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js?ver=3.6" type="text/javascript"></script>
       ```
   
 * 1. 1.4.1 is very old. current version is 1.8+
    2. as long as `<?php wp_head();?
   >` is included in your header.php file, you do not need to load jQuery manually,
   as the plugin will check if it is loaded and if not, load it up.
 * if you are not using the `wp_head()` function in your header.php file–and you
   have good reason for it–then at least load up the newest version of jQuery.
 * Please let us know if that gets things sussed out for you.
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010925)
 * I originally put `wp_head()` in to check what was being added. It put in 1.4.1(
   not sure why). I did try 1.10.3 and it only gave me a hover effect on the title
   text.
 * As it’s the weekend I won’t be able try it again. I will however post my results
   as soon as I can.
 * Thanks Baden.
    Dylan.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010964)
 * if `wp_head()` is inserting 1.4.1, which version of WordPress are you running?
   
   [http://plugins.twinpictures.de/wordpress-jquery-versions/](http://plugins.twinpictures.de/wordpress-jquery-versions/)
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010968)
 * 3.6
 * I will be able to make those changes in the next couple of hours.
 * Dylan.
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010969)
 * (When I said 1.10.3 I meant 1.10.2)
 * I tried `<?php wp_head(); ?>`, it put in 1.4.1.
 * I tried 1.10.2 again, no luck.
    I tried 1.8.3, no luck.
 * I also tried viewing just the post on it’s own. It is hidden as it should be;
   the arrow changes on click, but the content never shows. (Both views are using
   single.php with the same header scripts)
 * Dylan.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010977)
 * Dylan,
    Please either post a link to your page, so we can help further. The `
   wp_head()` function is kind of important, as it is the hook that all plugins 
   use to register the scripts and styles they need to function. If your goal for
   a bare-bones theme is to only load exactly what you need, and nothing else, you
   will have your hands full keeping things up to date.
 * If by inserting `wp_head()` in the header.php file, WP is loading jQuery 1.4.1
   then there is either a rogue plugin that is doing something stupid (happens all
   too often). We can help troubleshoot this, but we’ll need at least to take a 
   peek at the page.
    Please read this article for more info on the woes and fixes
   of improperly loaded jQuery: [http://msyk.es/blog/prevent-jquery-wordpress-theme/](http://msyk.es/blog/prevent-jquery-wordpress-theme/)
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010978)
 * I am very thankful of your time Baden.
 * I would post a link, but it isn’t physically possible. It is a LAN only site.
 * I put wp_head() in the header this afternoon (I’m in Australia), and found it
   was still inserting 1.4.1. I ended up working on something else and stumbled 
   into functions.php (in the theme). It turns out there was a line in there that
   was putting in 1.4.1. I deleted that section of code and it started inserting
   the correct jQuery version. I then did some testing and found that viewing the
   post by itself, everything worked fine.
 * I will keep testing tomorrow as I just thought of something to try.
 * No need to reply, I will mark as resolved when I work it out.
 * Thanks.
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010992)
 * I found the problem.
 * It turns out, after solving all the jQuery problems (thanks Baden :), as the 
   posts are being delivered by ajax and javascript, the content isn’t referencing
   the jQuery. That is why it works when showing just a single post, it loads the
   content and jQuery as one.
 * Dylan.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4010997)
 * AH! so when content is being loaded dynamically, they are not getting the collapse-
   o-matic treatment. If you get stuck, hit us back… we have experience with this
   one.
 *  Thread Starter [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * (@mr-franky)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4011015)
 * I’m thinking I might need some direction. I have just realised that something
   else I’m trying to implement is needing javascript to run in the post. It has
   the same problem as Collapse-O-Matic where it works fine by itself, just not 
   when it’s being delivered by ajax.
 * Dylan.

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

The topic ‘Barebones theme missing important code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-collapse-o-matic_fffeff.svg)
 * [Collapse-O-Matic](https://wordpress.org/plugins/jquery-collapse-o-matic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-collapse-o-matic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-collapse-o-matic/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-collapse-o-matic/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [custom theme](https://wordpress.org/support/topic-tag/custom-theme/)
 * [lost](https://wordpress.org/support/topic-tag/lost/)
 * [missing code](https://wordpress.org/support/topic-tag/missing-code/)
 * [missing php](https://wordpress.org/support/topic-tag/missing-php/)
 * [stripped](https://wordpress.org/support/topic-tag/stripped/)

 * 10 replies
 * 2 participants
 * Last reply from: [Mr Franky](https://wordpress.org/support/users/mr-franky/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/barebones-theme-missing-important-code/#post-4011015)
 * Status: resolved