How to add a post slider, on the home page? (block big_grid)
I understand here?
in “loop-single.php” – related and big-grid:
</article> <!-- /.post -->
<?php echo $td_mod_single->related_posts();?>
and
----> <?php echo $td_block_big_grid-> how to correctly write? ();?>
To display the last posts, how on the main page.
Hi,
You have to edit single.php(default template) to display Big Grid after sidebar and paste this shortcode like this: http://screencast.com/t/0G9dZSdugO
<div class="td-container">
<div class="td-container-border">
<div class="td-pb-row">
<?php
echo do_shortcode('[td_block_big_grid]');
comments_template('', true);
?>
</div>
</div>
</div>
Result: http://screencast.com/t/bBF74NyVZn
Thanks!
-
This reply was modified 11 years by
Alin [tagDiv].
Great! It’s Works!
Only had to remove 1 line:
comments_template('', true);
With this line was fatal error. I deleted this line.
Here we go:
<div class="td-container">
<div class="td-container-border">
<div class="td-pb-row">
<?php
echo do_shortcode('[td_block_big_grid]');
?>
</div>
</div>
</div>
By the way, you notice that the board moves down the left?
I also, like you have in the screenshot to the left leaves. How to align?
Hi,
Please provide a screenshot how yo put the code and result.
I did exactly like you see in screenshots, I did not made any other modifications(css..).
It should work in your case also.
Thanks!
A line error arises due to the fact that I removed the comments in the subject.
It turns out that this line is superfluous – comments_template('', true);
Problem lies elsewhere – block is shifted to the left:
Hi,
I’m sorry I forgot to tell you to delete comments line. If you want to have comments above Big Grid please edit like this: http://screencast.com/t/BlYCNb8eWs
If you want to leave comments above Big Grid you can paste only Big Grid shortcode (that you figured out): http://screencast.com/t/t2Af1FqNZ
I’m not sure if this is the issue, but you can add an extra class to container div(post-grid) like this:
<div class="td-container post-grid">
<div class="td-container-border">
<div class="td-pb-row">
<?php
echo do_shortcode('[td_block_big_grid]');
?>
</div>
</div>
</div>
And use this css: http://screencast.com/t/Y6a9eVGw9
.post-grid{
padding-left:1px;
}
Hope this helps!
-
This reply was modified 11 years by
Alin [tagDiv].
-
This reply was modified 11 years by
Alin [tagDiv].
I added in css file:
/* ----------------------------------------------------------------------------
post-grid
*/
.post-grid{
padding-left:1px;
}
and replace <div class="td-container"> on <div class="td-container post-grid"> in single.php
Thank you very much! Works!
Hi,
Glad that worked! You can add css code in Theme Panel > Custom css so it will be saved on theme updates: http://screencast.com/t/BWZRyxhq0E
Thanks!
Hi,
I guess that you refer to the Big Grid posts. Unfortunately Big Grid block doesn’t have an option to set number of posts to display or pagination.
Thanks!