Hello,
I love the theme NewsPaper I use and I love my loyal users with a new presentation of the articles.
What I would like to achieve is to move the sidebar under glad articles.
Like Naij.com, a site where recent publications are automatically charged under a section while scrolling the screen (read next). Link : https://www.naij.com/927683-popular-nollywood-actress-word.html
Will you add this suggestion in your future templates articles?
If not, can you give me instructions for me to realize myself?
Or, will you have any advice for me for the implementation of this template?
Thank you
Hi,
If you require the recent articles to be displayed on every post under the content, you can use a do_shortcode function and chose one of the content blocks. For example, you can use a block 4 limited to let’s say 15 articles. You can create the block the way you want the settings on a dummy page. After you create the block and set it up, once you click classic mode you can see the shortcode. For my example this was the resulting shortcode:
[vc_row][vc_column][td_block_4 custom_title="Latest articles" limit="15"][/vc_column][/vc_row]
You can use this block on a post by adding it to the post template files with a do_shotcode function like so:
<?php echo do_shortcode('[vc_row][vc_column][td_block_4 custom_title="Latest articles" limit="15"][/vc_column][/vc_row]'); ?>
http://screencast.com/t/aGMv6ov5
You will have to add tbis code for each of the post styles that you use on your site. Each post template has it’s own file.
I hope this helps.
Thank you!
Bogdan B.,
I tried your suggestion and it really works! But, this idea becomes difficult when we want to update the block frequently. I wonder if it would not be better to give the possibility to create a sidebar in widgets for posts.
What do you think about that?
Codialement
Hi,
You will need custom modifications for this as the tagdiv blocks will not be displayed properly if you plave a sidebar bellow the post content and we cannot help you with this, sorry. I can provide you a solution how to place a custom sidebar there. After you create a custom sidebar – http://screencast.com/t/0GxyKtAAeSom you can use this code to display it in the post template/style that you use – http://screencast.com/t/tHxg8F13F9b But like I said the tagdiv blocks will not be displayed properly, so I recommend Bogdan’s solution using shortcodes.
<?php dynamic_sidebar('sidebar's name'); ?>
Thanks!
-
This reply was modified 9 years by
Alin [tagDiv].
-
This reply was modified 9 years by
Alin [tagDiv].
Hello Alin [tagDiv]
Thank you for your contribution !
I read and I loved your idea, but I found a solution:
I created a sidebar with automatic generation of sidebar of the theme admin panel, and then I used the shortcode Bogdan B. to display the generated sidebar that contains the block 4 and it works very well. Now I can put any blocks in my sidebar generated, under the posts, it will be well displayed without losing the style. I do not know if it is a clean tip, but you can tell me. Otherwise, it works very well.
Thank you for everything !
cordially
-
This reply was modified 9 years by
SLogyc.
Hi Support,
I love the above solution, please can you guide me on how to achieve the
READ ALSO pop up on
https://www.naij.com/927683-popular-nollywood-actress-word.html