Tagged: layout, single post
-
AuthorPosts
-
March 20, 2017 at 11:46 am #763575
Hello,
is there a way to change the layout of a single post?
I searched forum and found:
Enfold already allows users to design Blog and Single blog pages using Advanced Layout Builder :)
And i managed to build my own blog page – but i failed to find the ‘Single blog pages’ Editor.
Can someone please point me to the right direction?
March 20, 2017 at 12:11 pm #763588Hey mikt,
The Single Blog Pages Editor is the default editor of wordpress if you use it you use the predefined layout for the single blog page, but if you use Advance Layout Editor, it will act like a page.
Best regards,
NikkoMarch 22, 2017 at 12:13 am #764449Hm, so there is no (easy) way to change the single blog post layout?
What i try to get is something like a fullscreen pic with post title followed by the post ( see link in private)Thanks
MichaelMarch 22, 2017 at 10:42 am #764680Hi,
I think you can do that by using a child theme: http://kriesi.at/documentation/enfold/using-a-child-theme/ copy single.php from Enfold theme to the child theme, then tweak the file.
Best regards,
NikkoApril 30, 2018 at 8:49 pm #949195Want to be able to change the order of the loop so that instead of:
- title
- feature image
- content
we get:
- feature image
- title
- content
And wanted to see if you had a code sample of this change.
May 2, 2018 at 7:12 am #949857Hi phillipsmind,
If you have already used the child theme, you need to create a folder called includes in the child theme, then copy loop-index.php of Enfold to the child theme, then edit it, find this code (line 193-198):
//echo preview image if(strpos($blog_style, 'big') !== false) { if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>'; if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>'; }
then cut this code and place it above this code (line 189):
echo strpos($blog_global_style, 'modern-blog') === false ? $cat_output.$title : $title.$cat_output;
Let us know if this helps.
Best regards,
NikkoMay 3, 2018 at 10:11 am #950612{ foreach($taxonomies as $taxonomy) { if(!in_array($taxonomy, $excluded_taxonomies)) { $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } } } //elegant blog //prev: if( $blog_global_style == 'elegant-blog' ) if( strpos($blog_global_style, 'elegant-blog') !== false ) { $cat_output = ""; if(!empty($cats)) { $cat_output .= '<span class="blog-categories minor-meta">'; $cat_output .= $cats; $cat_output .= '</span>'; $cats = ""; } /* -- [ NOTE ] --- REMOVED -------- echo '</div>'; // The wrapper div prevents the Safari reader from displaying the content twice ¯\_(ツ)_/¯ echo '<div class="av-heading-wrapper">'; echo strpos($blog_global_style, 'modern-blog') === false ? $cat_output.$title : $title.$cat_output; echo '</div>'; */ echo '<span class="av-vertical-delimiter"></span>'; //echo preview image if(strpos($blog_style, 'big') !== false) { if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>'; if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>'; } if(!empty($before_content)) echo '<div class="big-preview '.$blog_style.'">'.$before_content.'</div>'; echo '<div class="av-heading-wrapper">'; // The wrapper div prevents the Safari reader from displaying the content twice ¯\_(ツ)_/¯ echo strpos($blog_global_style, 'modern-blog') === false ? $cat_output.$title : $title.$cat_output; // -- [ NOTE ] --- ADDED TO REVERSE TITLE AND FEATURE // echo '</div>';
This is what I did – lines 183-230 – Seems to have worked properly.
May 3, 2018 at 1:15 pm #950740Hi phillipsmind,
Glad that we could help :)
Let us know if you need further assistance or if we can close this thread.Best regards,
NikkoJuly 24, 2018 at 11:42 pm #989442Why isn’t there an option that allows you to disable the built-in layout? Using the Advanced Layout in a single post just constrains everything into a defined layout making it pointless really. If I do two half-width sections, it just squeezes whatever is in it to a small, constrained width for the post. I’m surprised this issue wasn’t addressed a long time ago. Should be set up like it is with WooCommerce. If you use the Advanced Layout Builder, then it should disable all layout constraints so you can actually build your own single post layout templates. Having to make us go through all the trouble of editing the files ourselves just to make this happen kinda sucks.
July 24, 2018 at 11:47 pm #989443UPDATE – It now does what I mentioned….but there’s a catch. I was using the preview feature when I went to view the updates. The change to act like a page did NOT show until I saved the post. There seems to be a little bug that doesn’t activate that change unless the post is saved.
July 25, 2018 at 10:20 pm #989947Hi,
Kahil, do u have any custom code into all that added?
Best regards,
BasilisJuly 25, 2018 at 10:22 pm #989948What? Nothing was added.
July 27, 2018 at 9:12 am #990578Hi,
Thanks for reporting this bug. We’ll look into it.
Best regards,
DudeJuly 27, 2018 at 10:14 am #990604Hi,
I created a quick fix – this fix (or maybe another solution if we find a better one) will be added to the next update.
I uploaded the fix here if you want to test it: https://files.fm/u/c4tnhhfe
You need to replace two files – enfold/config-templatebuilder/avia-template-builder/assets/js/avia-builder.js and enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.phpBest regards,
Dude -
AuthorPosts
- You must be logged in to reply to this topic.