• I have custom themed a template trying to get the association to work with the rel= attributes. Everything is working accept for the relationships between my rel= tags. Can someone please help? Here is the code I am using below. I believe it has lost some type of inheritance due to the collapsible content being in an outside div.

    <?php
    
    /*
    Template Name: test
    */
    
       get_header();
    
      ?>
    
        <div class="postWrapper" id="post-<?php the_ID(); ?>">
    <div style="width: 250px; height: 100%; background: #bacde6; float: left;">
    <h2>Community</h2>
    <h4>TX</h4>
    <div>
    <ul>
    <li class="collapseomatic colomat-close noarrow" title="overview" id="col1" rel="fc-info">Community Overview
    <li class="collapseomatic  noarrow" title="floorplans" id="col2" rel="fc-info">Floor Plans & Details
    <li class="collapseomatic  noarrow" title="sale" id="col3" rel="fc-info">Inventory for Sale
    <li class="collapseomatic  noarrow" title="features" id="col4" rel="fc-info">Included Features
    <!--<li class="collapseomatic  noarrow" title="photos" id="col5" rel="fc-info">Commmunity Photos-->
    </ul>
    </div>
    </div>
    <div style="width: 650px; float: left;">
    <div id="target-col1" class="collapseomatic_content">
    <div style="width: 50%; float: left;">
    <h3>text</h3>
    <hr />
    text
    </div>
    <div style="width: 50%; float: left;">
    <h3>text</h3>
    <hr />
    </div>
    </div>
    <div id="target-col2" class="collapseomatic_content">
    <h3>text</h3>
    <hr />
    <?php
    $query = new WP_Query( array( 'post_type' => 'forest_colony', 'cat'=>'16') );
    
    if ( $query->have_posts() ) : ?>
    	<?php while ( $query->have_posts() ) : $query->the_post(); ?>
    
    		<p><span class="am-details">
    		<?php
      $details_values = get_post_custom_values('details');
      foreach ( $details_values as $key => $value ) {
        echo "$details   $value";
      }
    ?>
    		</span></p>
    		<h3><a>"><?php the_title(); ?></a></h3>
    		<div>
    
    <div class="am-home-img"><?php the_post_thumbnail('featured-home'); ?>
    <span class="am-get-details">Starting at</span>
    <span class="am-gray20">
    <?php
      $sqft_values = get_post_custom_values('price');
      foreach ( $sqft_values as $key => $value ) {
        echo "$price   $value";
      }
    ?>
    </span>
    <span class="am-get-details">Square Footage:</span>
    <span class="am-gray20">
    <?php
      $sqft_values = get_post_custom_values('sqft');
      foreach ( $sqft_values as $key => $value ) {
        echo "$sqft   $value";
      }
    ?>
    </span>
    <span class="am-get-details"></span>
    <span class="am-gray"></span>
    </div>
    <div class="am-more">
    <span class="am-get-details">Now Available in</span>
    <?php
      $communities_values = get_post_custom_values('communities');
      foreach ( $communities_values as $key => $value ) {
        echo "$communities   $value";
      }
    ?>
    </div>
    <div class="am-communities">
    <span class="am-get-details">Get Details:</span>
    <a>">text</a>
    </div><div class="clear"></div>
    	</div><div class="clear"></div>
    <div class="clear"></div>
    <hr />
    
    	<?php endwhile; wp_reset_postdata(); ?>
    	<!-- show pagination here -->
    <?php else : ?>
    	<!-- show 404 error here -->
    <?php endif; ?>
    
    </div>
    <div id="target-col3" class="collapseomatic_content">
    <h3>text</h3>
    <hr />
    <?php
    $query = new WP_Query( array( 'post_type' => 'available_inventory', 'category_name'=>'forest-colony', 'posts_per_page' => '40', 'order' => 'asc') );
    
    if ( $query->have_posts() ) : ?>
    	<?php while ( $query->have_posts() ) : $query->the_post(); ?>
        <p><span class="am-details">
    		<?php
      $details_values = get_post_custom_values('details');
      foreach ( $details_values as $key => $value ) {
        echo "$details   $value";
      }
    ?>
    		</span></p>
    		<div itemscope itemtype="http://schema.org/SingleFamilyResidence"><h3 id="<?php the_ID(); ?>"><a>" itemprop="address"><?php the_title(); ?></a></h3>
    		<div>
    
    <div class="am-home-img"><?php the_post_thumbnail( ); ?>
    <p><span class="am-get-details" style="padding-top: 15px;">Model / Elevation</span></p>
    <span class="am-gray"><?php
      $model_values = get_post_custom_values('model');
      foreach ( $model_values as $key => $value ) {
        echo "$model   $value";
      }
    ?></span>
    <p><span class="am-get-details" style="padding-top: 15px;">Square Footage:</span></p>
    <span class="am-gray">
    <?php
      $sqft_values = get_post_custom_values('sqft');
      foreach ( $sqft_values as $key => $value ) {
        echo "$sqft   $value";
      }
    ?>
    </span>
    <span class="am-get-details"></span>
    <span class="am-gray"></span>
    </div>
    <div class="am-more">
    <span class="am-get-details">Price:</span>     <?php
      $price_values = get_post_custom_values('price');
      foreach ( $price_values as $key => $value ) {
        echo "$price   $value";
      }
    ?>
    <p><span class="am-get-details">Available in:</span></p>
    <p itemprop="description"><?php
      $community_values = get_post_custom_values('community');
      foreach ( $community_values as $key => $value ) {
        echo "$community   $value";
      }
    ?></p>
    <?php
      $communities_values = get_post_custom_values('communities');
      foreach ( $communities_values as $key => $value ) {
        echo "$communities   $value";
      }
    ?>
    </div>
    <div class="am-communities">
    <span class="am-get-details">Get Details:</span>
    <a>">Click here to view various elevations, plan descriptions, home images, community amenities and much much more..</a>
    </div><div class="clear"></div>
    	</div><div class="clear"></div>
    <hr />
    </div>
    	<?php endwhile; wp_reset_postdata(); ?>
    	<!-- show pagination here -->
    <?php else : ?>
    	<!-- show 404 error here -->
    <?php endif; ?>
    </div>
    <div id="target-col4" class="collapseomatic_content">
    <div style="width: 50%; float: left;">
    <h3>text</h3>
    text
    </div>
    <div style="width: 50%; float: left;">
    <h3>text</h3>
    text
    </div>
    <div style="clear: both;"></div>
    </div>
    </div>
    </div>
    
    <?php
    
      get_footer( '2');
    
    ?>

    https://ww.wp.xz.cn/plugins/jquery-collapse-o-matic/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Baden

    (@baden03)

    1. please post a link to the page.
    2. why are you not closing your li tags?
    3. try not using a – in the rel value. it should not make a difference, but give it a try
    4. please do not post large amounts of code here in the forms.
    5. since you are using the roll-your-own method, be sure you have the ‘load script with shortcode’ UN-checked in the plugin option page.

    Thread Starter www.mec-designs.com

    (@mecdesigns)

    Baden,

    Thank you for your response and help. The li tags are closed. I am not sure why the pasted code is reflecting them not. I double checked the load script value and it is Un-checked. I removed the hyphen from the rel attributes as well.

    Here is a link to the page.
    http://tinyurl.com/n6snnwr
    password is wordpress

    Thanks again for the assistance. It is appreciated greatly.

    Plugin Author Baden

    (@baden03)

    I think you are looking for highlander grouping (where only one in the group can be expanded at a time) rather than standard set grouping (see documentation for more clarification: http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#highlander

    Simply change:

    rel="fcinfo"

    to:

    rel="fcinfo-highlander"

    Thread Starter www.mec-designs.com

    (@mecdesigns)

    You have no idea how big of a smile you just put on my face. You my friend are definitely appreciated. I did not see that attribute in the docs. I’m sorry for making you reiterate what is already supported. It has not gone unnoticed. Thank you so much.

    Thread Starter www.mec-designs.com

    (@mecdesigns)

    correct code for multiple relationships between collapseomatic content:

    <ul>
    <li class="collapseomatic colomat-close noarrow" title="overview" id="col1" rel="fcinfo-highlander">Community Overview</li>
    <li class="collapseomatic  noarrow" title="floorplans" id="col2" rel="fcinfo-highlander">Floor Plans & Details</li>
    <li class="collapseomatic  noarrow" title="sale" id="col3" rel="fcinfo-highlander">Inventory for Sale</li>
    <li class="collapseomatic  noarrow" title="features" id="col4" rel="fcinfo-highlander">Included Features</li>
    </ul>

    Plugin Author Baden

    (@baden03)

    Happy to see you got it sussed out. Always nice to end up with a happy camper!
    Issue marked as resolved. Don’t forget to vote for pedro!

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

The topic ‘Rel= attribute not working’ is closed to new replies.