-
AuthorPosts
-
August 24, 2015 at 7:56 pm #492465
I have a Blog page created in the advanced editor using the masonry grid. This page has a header and sidebar. The single blog post also has a sidebar and header in accordance to a template I setup. However, if you view the posts in the archive, the layout is completely different. I was able to make it a grid by using adding something to functions.php I found in this forum but how can I get back my sidebar and header. I simply want a similar look to the main blog page. Your demo does just what I want but I can’t see how this is done.
http://www.websiteproud.com/wptest/contact/blog/
I had a play with “Display Widgets” plugin but this didn’t seem to help.
August 25, 2015 at 12:57 pm #492875Hey kevsboredagain!
not sure what you mean. Can you show us an example of what you want to achieve? you can import the demo in question to be able to see how it was done. You could use a second installation or a one on a localhost if you don’t want to overwrite existing files.
Regards,
AndyAugust 25, 2015 at 7:47 pm #493173On the main blog page I have a header and sidebar.
https://dl.dropboxusercontent.com/u/33722941/blog1.jpgOn the archive page, I was able to create a similar grid style by adding some filter to functions.php as suggested on this forum and also add a sidebar by changing the code in archive.php, also suggested here.
https://dl.dropboxusercontent.com/u/33722941/blog2.jpg
However, the archive page seems to be full width and the sidebar drops underneath and I’m not sure how I add the slider image. I assume to this is an addition to archive.php
I’ll have a look at the demo after an import as that seems to retain the sidebar component at least.
August 25, 2015 at 8:38 pm #493206I’ve been able to fix the sidebar issue. I was using a sidebar widget placed by the advanced editor instead of using the theme sidebar settings, as in the demo. Changing this fixed that problem.
All I need now is to know how to place the slider image from the blog page into the archive layout.
August 26, 2015 at 12:43 pm #493500Hey!
Can you please provide a link to the archive page? I’m sorry but you can’t set the archive or category page to masonry grid. If you want to change the style of the archive page, you can follow the instructions here: http://kriesi.at/documentation/enfold/change-archive-categorytag-blog-style/
Available styles are are single-small, single-big, blog-grid and multi-big. Regarding the slider, you will have to modify the archive.php file and probably add the shortcode manually. Use the do_shortcode function: https://developer.wordpress.org/reference/functions/do_shortcode/
Cheers!
IsmaelAugust 26, 2015 at 7:20 pm #493778The archive is at for example http://www.websiteproud.com/wptest/category/at-le-crann/
and the header at http://www.websiteproud.com/wptest/blog/
I’ve followed your suggestions and have a grid on the archive page as well as the header. Not sure why the sidebar is no longer on the rhs?
I added this php part just before the div
<?php echo do_shortcode(“[av_slideshow_full size='no scaling' stretch='' animation='slide' autoplay='false' interval='5' control_layout='av-control-default' src='' attachment='' attachment_size='' position='top left' repeat='no-repeat' attach='scroll']
[av_slide_full slide_type='image' id='2331' video='' mobile_image='' video_format='' video_ratio='' title='Le Crann Blog' custom_title_size='' custom_content_size='' caption_pos='caption_left caption_left_framed caption_framed' link_apply='' link='lightbox' link_target='' button_label='' button_color='light' link1='manually,http://' link_target1='' button_label2='' button_color2='light' link2='manually,http://' link_target2='' font_color='' custom_title='' custom_content='' overlay_opacity='0.1' overlay_color='' overlay_pattern='' overlay_custom_pattern='']
[/av_slide_full]
[/av_slideshow_full]“)
?><div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
- This reply was modified 9 years, 4 months ago by kevsboredagain.
August 28, 2015 at 5:24 pm #495013Any idea how to insert the shortcode without breaking the page structure for the sidebar?
Including a slider shortcode into the archive page, puts in these end of div tags which mess up the page layout:
</div></div></div><!– close content main div –></div></div>
Therefore to compensate for these wrong tags, I simply added
<div><div><div><div><div> immediately before the shortcode insertion.
This fixes the problem but I would rather not do hacks like this as a theme update in future may resolve this.
- This reply was modified 9 years, 4 months ago by kevsboredagain.
August 31, 2015 at 7:44 am #495609Hi!
There’s a 404 error when I visited the page. Please check. Try to remove the extra div tags then add this in the Quick CSS field:
.archive .sidebar { clear: none !important; float: left; width: 23% !important; }
Adjust the width if necessary.
Regards,
IsmaelAugust 31, 2015 at 7:55 pm #496061Thanks for the reply. The CSS does put the sidebar in the correct location but the general layout of the page is still damaged due to those extra /div tags. This can be seen by the border not being in the correct place.
The 401 was perhaps because I was migrating the site over the weekend but not sure why. Weird.
Your CSS change is here without extra divs
http://www.websiteproud.com/wptest/category/at-le-crann/and the migrated site with slight changes to categories but no CSS change and my extra div’s added is here:
http://www.gitesinsouthernbrittany.com/category/special-offers/September 1, 2015 at 10:20 am #496345Hey!
Looks like it is much better with the extra added divs. There are conditional functions in the theme which creates extra containers when a certain element is present ( color section and sliders for example ) or when a certain element is added at the end or the beginning of the page. The hack that you added is required if you really want to add this slider in the archive page.
If you prefer to add the hack in a child theme, remove the extra divs in the archive.php file then use this in the function.php file:
add_action('ava_after_main_title', function() { if(is_archive()) { echo "<div><div><div><div><div>"; } });
If you’re planning to only use it on category pages, replace the is_archive function with this: https://codex.wordpress.org/Function_Reference/is_category
Regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.