using Bootstrap Accordion with Wordpress ACF repeater fields - wordpress

I am using Bootstrap Accordion with ACF and have a repeater in a repeater section. I get all the data and it is displayed as it should be but when I click on the title to open the body the class changes to "collapse show" and the accordion opens for a fraction of a second only to close again immediately. Does any one have any ideas? Here's the code:
<div id="accordion">
<div class="card">
<?php
if( have_rows('instructions_android')):
$i = 1;
while ( have_rows('instructions_android')) : the_row();
?>
<div class="card-header" id="heading<?php echo $i; ?>">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapse<?php echo $i; ?>" aria-expanded="false" aria-controls="collapse<?php echo $i; ?>">
<span class="instr-title"><?php echo get_sub_field('etape_installation_no'); ?> : </span><span class="instr-title"><?php echo get_sub_field('titre_du_step'); ?></span>
</button>
</h5>
</div>
<div id="collapse<?php echo $i; ?>" class="collapse" aria-labelledby="heading<?php echo $i; ?>" data-parent="#accordion">
<?php
$i++;?>
<div class="card-body">
<ul>
<?php
$j = 1;
if( have_rows('descr_step')):
while ( have_rows('descr_step')) : the_row();
?>
<li><?php echo get_sub_field('description'); ?></li>
<?php
$j++;
endwhile; ?>
</ul>
<?php endif; ?>
</div><!--card body-->
</div>
</div><!--card-->
<?php endwhile;
endif;?>
</div>

Related

comments not appear in my wordpress theme

why comments isn't appear on my theme although I confirmed showing comments! can anyone help please
these are screenshots
https://1drv.ms/u/s!AjjUt5PVIDDuklSRItYU-MAfSzP7?e=2tUhsi
https://1drv.ms/u/s!AjjUt5PVIDDuklV3poojMWiK6lAG?e=3nnult
this is my single post page
<?php get_header(); ?>
<div class="container">
<div class="row">
<?php
if(have_posts()){
while(have_posts()){
the_post(); ?>
<div class="post p-3 m-3 bg-light">
<?php edit_post_link('<span class="float-right">Edit <i class="fa fa-edit"></i></span>'); ?>
<h3>
<a href="<?php the_permalink() ?>">
<?php the_title() ?>
</a>
</h3>
<small class="post-author text-secondary mx-2"><i class='fa fa-user mx-1'></i><?php the_author_posts_link(); ?></small>
<small class="post-date text-secondary mx-2"><i class="fa fa-calendar mx-1"></i><?php the_time('F j, Y') ?></small>
<small class="post-comments text-secondary mx-2"><i class="fa fa-comments mx-1"></i><?php comments_popup_link('no comments', 'one comment', '% comments', 'comment-url', 'commenting is disabled'); ?></small>
<?php the_post_thumbnail('', ['class' => 'img-fluid img-thumbnail d-block']); ?>
<?php the_content(); ?>
<hr>
<span class='post-tags'>
<i class='fa fa-tags'></i>
<?php the_category(', ') ?>
</span>
<span class='d-block'>
<?php
if(has_tag()){
the_tags();
} else{
echo 'Tags: no Tags';
}
?>
</span>
</div>
<?php
}
}
echo '<div class="clearfix"></div>';
echo'<div class="post-pagination py-3 my-2 mx-auto">';
echo '<span class="mx-3">';
previous_post_link();
echo '</span>';
echo '<span class="mx-3">';
next_post_link();
echo '</span>';
echo '</div>';
?>
</div>
<?php
echo '<hr>';
comments_template('/comments.php',true);
?>
</div>

Bootstrap Collapse with ACF Repeater?

Just wondering if anyone could help me with my code please?
I've setup an ACF Repeater for the Bootstrap Collapse, which displays, but when I click the titles they don't collapse to show the content.
<?php if( have_rows('accordion') ): ?>
<div class="accordion" id="accordion">
<?php $i = 0; ; while ( have_rows('accordion') ) : the_row(); $i++; $tCount = $i; ?>
<div class="card">
<div class="card-header" id="heading<?php echo $tCount; ?>">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse<?php echo $tCount; ?>" data-target="#collapse<?php echo $tCount; ?>" aria-expanded="false" aria-controls="collapse<?php echo $tCount; ?>"><?php the_sub_field('title'); ?></button>
</div><!--End Card Header-->
</div><!--End Card-->
<div id="collapse<?php echo $tCount; ?>" class="collapse" aria-labelledby="heading<?php echo $tCount; ?>" data-parent="#accordionExample">
<div class="card-body">
Text
</div>
</div>
<?php endwhile; ?>
</div><!--End Accordian-->
<?php else : endif; ?>
Thanks!
I got it working, turned out I was echo'ing some PHP in the wrong area. If anybody needs the code, here it is:
<?php if( have_rows('accordion') ): ?>
<div class="accordion" id="accordion">
<?php $i = 0; ; while ( have_rows('accordion') ) : the_row(); $i++; $tCount = $i; ?>
<?php
$field_accordion = get_sub_field_object('accordion_background_colour');
$value_accordion = $field_accordion['value'];
$label_accordion = $field_accordion['choices'][ $value_accordion ];
?>
<div class="card accordion-<?php echo $value_accordion; ?>-background">
<div class="card-header" id="heading<?php echo $tCount; ?>">
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse<?php echo $tCount; ?>" aria-expanded="false" aria-controls="collapse<?php echo $tCount; ?>">
<h4><?php the_sub_field('title'); ?> <i class="fa fa-arrow-down" aria-hidden="true"></i></h4>
</button>
</div><!--End Card Header-->
</div><!--End Card-->
<div id="collapse<?php echo $tCount; ?>" class="collapse" aria-labelledby="heading<?php echo $tCount; ?>" data-parent="#accordion">
<div class="card-body">
Text
</div>
</div>
<?php endwhile; ?>
</div><!--End Accordian-->
<?php else : endif; ?>

ACF repeater field content into tabs

I'm trying to present a clean easy to use client back end field submission in the WP Admin dashboard that can sort repeater field data into appropriate tabbed content. here is the setup.
Field setup
Backend
Frontend
The code I tried;
<div class="tab-pane fade" id="tab-1-3">
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active">English</li>
<li role="presentation">Spanish</li>
</ul>
<div class="tab-content lang-tab-content">
<div role="tabpanel" class="tab-pane active" id="english">
<?php
$count=0;
if( have_rows('article') ):
while ( have_rows('article') ) : the_row();
?>
<?php if (the_sub_field('language') == 'English') { ?>
<strong>Published Date:</strong> <?php the_sub_field('publised_date');?>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading<?php echo $count ?>">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo $count ?>" aria-expanded="false" aria-controls="collapse<?php echo $count ?>">
<?php the_sub_field('article_title');?>
</a>
</h4>
</div>
<div id="collapse<?php echo $count ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php echo $count ?>">
<div class="panel-body">
<?php the_sub_field('article_body');?>
</div>
</div>
</div>
</div>
<?php } ?>
<?php
$count++;
endwhile;
else :
endif;
?>
</div>
<div role="tabpanel" class="tab-pane" id="spanish">Spanish</div>
</div>
</div><!-- tab-pane -->
please show the loop code. Without any information about your code this is pretty hard to answer.
I would simply loop through all the repeater rows and set a class to hide the elements based on the prefered language. Then toggle the class with javascript on button click.
UPDATE
<?php
$count=0; $english =''; $spanish ='';
if( have_rows('article') ):
while ( have_rows('article') ) : the_row();
$count++;
if (the_sub_field('language') == 'English'){
$english .= '<strong>Published Date: '.get_sub_field('publised_date').'</strong>';
$english .= '<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"><div class="panel panel-default">';
/** PANEL HEADING **/
$english .= '<div class="panel-heading" role="tab" id="heading'.$count.'">';
$english .= '<h4 class="panel-title">';
$english .= '<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse'.$count.'" aria-expanded="false" aria-controls="collapse'.$count.'">';
$english .= get_sub_field('article_title');
$english .= '</a></h4></div>';
/** END PANEL HEADING **/
/** COLLAPSE START **/
$english .= '<div id="collapse'.$count.'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading'.$count.'"><div class="panel-body">'.get_sub_field('article_body').'</div></div>';
/** COLLAPS END **/
$english .= '</div></div>';
}
else{
$spanish .= '<strong>Published Date: '.get_sub_field('publised_date').'</strong>';
$spanish .= '<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"><div class="panel panel-default">';
/** PANEL HEADING **/
$spanish .= '<div class="panel-heading" role="tab" id="heading'.$count.'">';
$spanish .= '<h4 class="panel-title">';
$spanish .= '<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse'.$count.'" aria-expanded="false" aria-controls="collapse'.$count.'">';
$spanish .= get_sub_field('article_title');
$spanish .= '</a></h4></div>';
/** END PANEL HEADING **/
/** COLLAPSE START **/
$spanish .= '<div id="collapse'.$count.'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading'.$count.'"><div class="panel-body">'.get_sub_field('article_body').'</div></div>';
/** COLLAPS END **/
$spanish .= '</div></div>';
}
endwhile;
endif;
?>
<div class="tab-content lang-tab-content">
<div role="tabpanel" class="tab-pane active" id="english">
<?php echo $english; ?>
</div>
<div role="tabpanel" class="tab-pane" id="spanish">
<?php echo $spanish; ?>
</div>
</div>
Solved.
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active">English</li>
<li role="presentation">spanish</li>
</ul>
</div>
<div class="tab-content lang-tab-content">
<div role="tabpanel" class="tab-pane active" id="english">
<?php $ons=0; if(get_field('own_news')): ?>
<?php while(has_sub_field('own_news')): ?>
<?php if( get_sub_field('language') == 'English' ): ?>
<strong>Published Date:</strong> <?php the_sub_field('publised_date');?>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading<?php echo $ons ?>">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo $ons ?>" aria-expanded="false" aria-controls="collapse<?php echo $ons ?>"><?php the_sub_field('article_title');?></a>
</h4>
</div>
<div id="collapse<?php echo $ons ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php echo $ons ?>">
<div class="panel-body">
<?php the_sub_field('article_body');?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php $ons++; endwhile; ?>
<?php endif; ?>
</div>
<div role="tabpanel" class="tab-pane" id="spanish">
<?php $ons=200; if(get_field('own_news')): ?>
<?php while(has_sub_field('own_news')): ?>
<?php if( get_sub_field('language') == 'Spanish' ): ?>
<strong>Published Date:</strong> <?php the_sub_field('publised_date');?>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading<?php echo $ons ?>">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo $ons ?>" aria-expanded="false" aria-controls="collapse<?php echo $ons ?>"><?php the_sub_field('article_title');?></a>
</h4>
</div>
<div id="collapse<?php echo $ons ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading<?php echo $ons ?>">
<div class="panel-body">
<?php the_sub_field('article_body');?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php $ons++; endwhile; ?>
<?php endif; ?>
</div>
</div>

Wordpress pagination with this loop

Can you help me to find the right code for pagination with this loop?
Here is my loop:
<?php query_posts('showposts=1&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
...
<?php endwhile; else: ?>
...
<?php endif; ?>
<?php rewind_posts(); ?>
<?php query_posts('showposts=2&offset=1&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
...
<?php endwhile; else: ?>
...
<?php endif; ?>
<?php rewind_posts(); ?>
<?php query_posts('showposts=6&offset=3&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
...
<?php endwhile; else: ?>
...
<?php endif; ?>
EDIT
This was my old loop, how can I convert it to the new one? Unfortunately I don't know how php works..
<?php
if (is_front_page() ) {
get_header( 'front' );
} else {
get_header();
}
?>
<section id="content" class="container">
<div class="row">
<div class="col-md-7 col-sm-7">
<?php query_posts('showposts=1&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article class="thumbnail thumbnail-principale expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<div class="destacado"><h3>Destacado</h3></div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<?php comments_template(); ?><!-- da sistemare -->
</header>
</article>
</div>
<?php endwhile; else: ?>
<p>Sorry, there are no posts to display</p>
<?php endif; ?>
<?php rewind_posts(); ?>
<?php query_posts('showposts=2&offset=1&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-md-5 col-sm-5">
<article class="thumbnail thumbnail-destra expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<header class="testo-articolo-destra expand-image">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
</header>
<div class="badge1"></div>
</article>
</div>
<?php endwhile; else: ?>
<p>Sorry, there are no posts to display</p>
<?php endif; ?>
</div><!-- /.row -->
<div class="row">
<?php rewind_posts(); ?>
<?php query_posts('showposts=6&offset=3&post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-md-4 col-sm-4">
<article class="thumbnail distanza expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive ingrandire-img')); ?>
</div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('Ningún comentario', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<p><a class="btn btn-default read-more" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Lee más', 'katartika' ); ?></a></p>
</header>
</article>
</div>
<?php endwhile; else: ?>
<p>Sorry, there are no posts to display</p>
<?php endif; ?>
</div><!-- /row -->
<div style="text-align:center;">
<?php posts_nav_link(‘|’, ‘Prossimo’, ‘Precedente’); ?>
</div>
</section>
</div><!-- /sezione -->
<?php get_footer(); ?>
As I have stated last night, you can do this in one query, and without a custom query.
I would like to enforce the fact that you should never use query_posts. query_posts breaks paginations, rerun queries slowing your page performance and breaks the main query object which is needed by many plugins or custom functions. It is truely an evil way to run custom queries which should be avoided at all costs. If you ever need to run custom queries, use WP_Query for paginated queries and get_posts for non paginated queries.
You should also never replace the main query with a custom one on the home page and any archive type page, this breaks page functionalities. Custom queries should only be run for secondary posts like sliders, featured content, related and popular posts and on page templates and static front pages to display custom posts. If you ever need to alter the main query on the homepage or and archive page, use pre_get_posts
Now, to solve your issue, you need one loop from the main query and a counter, in this case we will use the build in main query counter $wp_query->current_post (one note, this counter starts at 0, so post one in the loop will be 0, post two will be 1, etc).
From what I read from your code, the first code needs to be different from post two and three, and these are different from the next six
Lets put that into code
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
/*
* Display different outlay for post one
*/
if ( $wp_query->current_post === 0 ) {
// Do what needs to be done for post one
} elseif ( $wp_query->current_post >= 1 && $wp_query->current post <= 2 ) {
/*
* Do something for posts 2 and 3
*/
} elseif ( $wp_query->current_post >= 3 ) {
/*
* Do something for the rest of the posts
*/
}
}
}
EDIT
You can convert your code to
<?php
if (is_front_page() ) {
get_header( 'front' );
} else {
get_header();
}
?>
<section id="content" class="container">
<div class="row">
<div class="col-md-7 col-sm-7">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
if ( $wp_query->current_post === 0 ) { ?>
<article class="thumbnail thumbnail-principale expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<div class="destacado"><h3>Destacado</h3></div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<?php comments_template(); ?><!-- da sistemare -->
</header>
</article>
</div>
<?php
} elseif ( $wp_query->current_post >= 1 && $wp_query->current post <= 2 ) { ?>
<div class="col-md-5 col-sm-5">
<article class="thumbnail thumbnail-destra expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<header class="testo-articolo-destra expand-image">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
</header>
<div class="badge1"></div>
</article>
</div>
<?php
} elseif ( $wp_query->current_post >= 3 ) { ?>
<div class="col-md-4 col-sm-4">
<article class="thumbnail distanza expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive ingrandire-img')); ?>
</div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('Ningún comentario', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<p><a class="btn btn-default read-more" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Lee más', 'katartika' ); ?></a></p>
</header>
</article>
</div>
<?php }
endwhile;
endif; ?>
</div><!-- /row -->
<div style="text-align:center;">
<?php posts_nav_link(‘|’, ‘Prossimo’, ‘Precedente’); ?>
</div>
</section>
</div><!-- /sezione -->
<?php get_footer(); ?>
I don't know if it is the right way, but I got it:
<?php
if (is_front_page() ) {
get_header( 'front' );
} else {
get_header();
}
?>
<section id="content" class="container">
<div class="row">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
if (!is_paged() && $wp_query->current_post === 0 ) { ?>
<div class="col-md-7 col-sm-7">
<article class="thumbnail thumbnail-principale expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<div class="destacado"><h3>Destacado</h3></div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<?php comments_template(); ?><!-- da sistemare -->
</header>
</article>
</div>
<?php
} elseif (!is_paged() && $wp_query->current_post >= 1 && $wp_query->current_post <= 2 ) { ?>
<div class="col-md-5 col-sm-5">
<article class="thumbnail thumbnail-destra expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive')); ?>
</div>
<header class="testo-articolo-destra expand-image">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
</header>
<div class="badge1"></div>
</article>
</div>
<?php
} elseif ( $wp_query->current_post >= 3 ) { ?>
<div class="col-md-4 col-sm-4">
<article class="thumbnail distanza expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive ingrandire-img')); ?>
</div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('Ningún comentario', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<p><a class="btn btn-default read-more" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Lee más', 'katartika' ); ?></a></p>
</header>
</article>
</div>
<?php
//new request for all the rest of post from page 2 onwards
} elseif ( is_paged() ) { ?>
<div class="col-md-4 col-sm-4">
<article class="thumbnail distanza expand-image">
<div class="featured-image">
<?php echo get_the_post_thumbnail($post_id, 'large', array('class' => 'img-responsive ingrandire-img')); ?>
</div>
<header class="testo-articolo">
<h3><?php the_title(); ?></h3>
<div class="entry-meta">
<p class="text-muted resume"><span><i class="fa fa-calendar"></i><?php the_time('j M y'); ?></span><span><i class="glyphicon glyphicon-user"></i><?php the_author(); ?></span><span><i class="fa fa-comment-o"></i><?php comments_popup_link('Ningún comentario', '1 Comentario', '% Comentarios'); ?></span></p>
</div>
<p><?php the_excerpt(); ?></p>
<p><a class="btn btn-default read-more" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Lee más', 'katartika' ); ?></a></p>
</header>
</article>
</div>
<?php }
endwhile;
endif; ?>
</div><!-- /row -->
<div style="text-align:center;">
<?php posts_nav_link('|', 'Prossimo', 'Precedente'); ?>
</div>
</section>
</div><!-- /sezione -->
<?php get_footer(); ?>

How to overlay footer over background

I am in the process of build a layout and need the footer to appear as the following:
http://i.stack.imgur.com/V56Hd.png
Currently, the footer just sits inside of the background, while I need it inside of the white area then on top of the footer background as shown:
Here is the code I have on the footer:
<footer id="footer">
<div class="container">
<div class="row-fluid">
<div class="column span2">
<h3 class="header"><?php echo $text_information; ?> <i class="icon-caret-down"></i></h3>
<ul class="content">
<?php $i=1; foreach ($informations as $information) { ?>
<li id="inf<?php echo $i;?>"><?php echo $information['title']; ?></li>
<?php $i++; } ?>
</ul>
</div>
<div class="column span2">
<h3 class="header"><?php echo $text_service; ?> <i class="icon-caret-down"></i></h3>
<ul class="content">
<li><?php echo $text_contact; ?></li>
<li><?php echo $text_return; ?></li>
<li><?php echo $text_sitemap; ?></li>
</ul>
</div>
<!--<div class="column span2">
<h3 class="header"><?php echo $text_extra; ?> <i class="icon-caret-down"></i></h3>
<ul class="content">
<li><?php echo $text_manufacturer; ?></li>
<li><?php echo $text_voucher; ?></li>
<li><?php echo $text_affiliate; ?></li>
<li><?php echo $text_special; ?></li>
</ul>
</div>-->
<div class="column span2">
<h3 class="header"><?php echo $text_account; ?> <i class="icon-caret-down"></i></h3>
<ul class="content">
<li><?php echo $text_account; ?></li>
<li><?php echo $text_order; ?></li>
<li class="wishlist-link"><?php echo $text_wishlist; ?></li>
<li><?php echo $text_newsletter; ?></li>
</ul>
</div>
<div class="span4">
<?php if($this->config->get('clearshop_status')== 1) { ?>
<div class="social">
<h3><?php echo $this->language->get('text_keep_in_touch'); ?></h3>
<?php if(($this->config->get('clearshop_facebook_page') != '') && ($this->config->get('clearshop_facebook_icon') == 1)) { ?>
<a href="https://facebook.com/<?php echo $this->config->get('clearshop_facebook_page'); ?>" target="_blank">
<i class="icon-facebook-sign"></i>
</a>
<?php } ?>
<?php if(($this->config->get('clearshop_twitter_username') != '') && ($this->config->get('clearshop_twitter_icon') == 1)) { ?>
<a href="https://twitter.com/#!/<?php echo $this->config->get('clearshop_twitter_username'); ?>" target="_blank">
<i class="icon-twitter"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_youtube_username') != '') { ?>
<a href="https://youtube.com/user/<?php echo $this->config->get('clearshop_youtube_username'); ?>" target="_blank">
<i class="icon-youtube"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_gplus_id') != '') { ?>
<a href="https://plus.google.com/u/0/<?php echo $this->config->get('clearshop_gplus_id'); ?>" target="_blank">
<i class="icon-google-plus"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_pinterest_id') != '') { ?>
<a href="https://pinterest.com/<?php echo $this->config->get('clearshop_pinterest_id'); ?>" target="_blank">
<i class="icon-pinterest"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_instagram_username') != '') { ?>
<a href="https://instagram.com/<?php echo $this->config->get('clearshop_instagram_username'); ?>" target="_blank">
<i class="icon-instagram"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_tumblr_username') != '') { ?>
<a href="http://<?php echo $this->config->get('clearshop_tumblr_username'); ?>.tumblr.com" target="_blank">
<i class="icon-tumblr"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_skype_username') != '') { ?>
<a href="skype:<?php echo $this->config->get('clearshop_skype_username'); ?>?call" target="_blank">
<i class="icon-skype"></i>
</a>
<?php } ?>
<?php if($this->config->get('clearshop_linkedin_username') != '') { ?>
<a href="linkedin:<?php echo $this->config->get('clearshop_linkedin_username'); ?>?call" target="_blank">
<i class="icon-linkedin"></i>
</a>
<?php } ?>
</div>
<?php if($this->config->get('clearshop_footer_info_text') != '') { ?>
<div class="info">
<?php echo html_entity_decode($this->config->get('clearshop_footer_info_text'), ENT_QUOTES, 'UTF-8');?>
</div>
<?php } ?>
<?php } ?>
</div>
</div> <!-- .row-fluid -->
</div> <!-- .container -->
</footer> <!-- #footer -->
Well one thing you could try is z-index go to css file and write down
#footer{z-index:9999;}
and see if that works for you, your question is not clear enough, but this was what i understood.

Resources