Viewing 30 posts - 1 through 30 (of 35 total)
  • Author
    Posts
  • #917850

    Hi,

    is it possible to have 2 different blog stylings for single blog posts, e.g.: “Default (Business)” for common blog posts and “Elegant” for selected blog posts?

    Thank you for your help in advance. Have a great day!

    Kind regards,
    Sophie

    #917995

    Hey Sophie,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #933756

    Okay :-( , thank you Basilis. You can close this topic out.

    Kind regards,
    Sophie

    #934203

    Hi,

    Sorry, we couldn’t be of much help but you can try using a third party plugin that would let you do this.

    Thank you for contacting us.

    Best regards,
    Vinay

    #934245

    you mean if you have category a it will be default – and if it is category b it is elegant ?

    #934310

    Hi,

    Using custom code it is possible to style blog post based on categories.

    However, at the moment selecting a default style provided by the theme is not an out of the box option.

    But please feel free to request such feature at our feature request system: https://kriesi.at/support/enfold-feature-requests/

    This system allows us to keep track of user suggestions and lets you vote on the feature you would like to see the most. I am afraid though there is no guarantee that a feature will get implemented. If that’s something you really need you can always try to hire a developer for the task :)

    Best regards,
    Vinay

    #934343

    hm – if you style your blogs via the blog alb – means if you setup a page f.e. and show your blog with blog ALB – we can create a meta-box on the right side of your editor page:

    put this into functions.php of your child-theme:

    add_filter('avf_builder_boxes', 'register_global_blog_style', 10, 1);
    function register_global_blog_style($boxes){
        $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page' , 'post' , 'portfolio' ), 'context'=>'side', 'priority'=>'low');
    return $boxes;
    }
    
    add_filter('avf_builder_elements', 'register_meta_blogstyle', 10, 1);
    function register_meta_blogstyle($avf_builder_elements){
      $avf_builder_elements[] = array(
              "slug"  => "layout",
              "name"  => __("Blog Styling", 'avia_framework' ),
              "desc"  => __("Choose the blog styling here.", 'avia_framework' ),
              "id"  => "blog_global_style",
              "type"  => "select",
              "std"   => "",
              "no_first"=>true,
              "subtype" => array( 
                      __( 'Default (Business)', 'avia_framework' ) =>'',
                      __( 'Elegant', 'avia_framework' ) =>'elegant-blog',
                      __( 'Modern Business', 'avia_framework' ) =>'elegant-blog modern-blog',
                        ));
    
    return $avf_builder_elements;
    }

    you will have than on the right in Layout Options the choice of setting blog_style for each page
    see here : https://webers-testseite.de/blog-seite-elegant/
    and: vice versa: https://webers-testseite.de/blog-seite-modern/

    #934356

    by the way dear mods : it makes no sence of heaving that on portfolio or posts but changing above code to that line has no effect – it shows the metabox too
    $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page'), 'context'=>'side',

    Why?

    #934362

    and again you can have here too f.e. the choice of header style for each page ;)

    add_filter('avf_builder_boxes', 'register_meta_boxes', 10, 1);
    function register_meta_boxes($boxes){
    $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page' , 'post' , 'portfolio' ), 'context'=>'side', 'priority'=>'low');
    return $boxes;
    }
    
    add_filter('avf_builder_elements', 'register_meta_elements', 10, 1);
    function register_meta_elements($avf_builder_elements){
    $avf_builder_elements[] = array(
    						"slug"	=> "layout",
    						"name" 	=> __("Menu and Logo Position", 'avia_framework'),
    						"desc" 	=> __("You can choose various different logo and main menu positions here", 'avia_framework'),
    						"id" 	=> "header_layout",
    						"type" 	=> "select",
    						"std" 	=> "",
    						"subtype" => array( __('Logo left, Menu right', 'avia_framework')  	=>'logo_left main_nav_header menu_right',
    											__('Logo right, Menu Left', 'avia_framework')	 	=>'logo_right main_nav_header menu_left',
    											__('Logo left, Menu below', 'avia_framework') 	=>'logo_left bottom_nav_header menu_left',
    											__('Logo right, Menu below', 'avia_framework') 	=>'logo_right bottom_nav_header menu_center',
    											__('Logo center, Menu below', 'avia_framework') 	=>'logo_center bottom_nav_header menu_right',
    										));
    $avf_builder_elements[] = array(
    				          "slug"  => "layout",
    				          "name"  => __("Blog Styling", 'avia_framework' ),
    				          "desc"  => __("Choose the blog styling here.", 'avia_framework' ),
    				          "id"  => "blog_global_style",
    				          "type"  => "select",
    				          "std"   => "",
    				          "no_first"=>true,
    				          "subtype" => array( 
    				                  __( 'Default (Business)', 'avia_framework' ) =>'',
    				                  __( 'Elegant', 'avia_framework' ) =>'elegant-blog',
    				                  __( 'Modern Business', 'avia_framework' ) =>'elegant-blog modern-blog',
    				                    ));
    
    return $avf_builder_elements;
    }
    #934483

    Hi,


    @Guenni007
    Thank you for sharing this tip.

    Let us know if this works for you.

    Best regards,
    Vinay

    #934715

    yes but it seems that there is something missing !
    i started with Enfold Options Elegant – then it is possible to have modern because it only goes an additional class to html (html_modern-blog)
    but from that point it does not remove the globaly set elegant if i choose business .
    – i will try a different solution now – but had to remove those settings for now

    sorry – it seems not to work propper

    the thing is that on html there are the classes added – (html_blog-elegant, html_blog-modern) if they were present the blog will look this way we know. But adding it via addClass has a timeshift – thats ugly – so best would be to have a filter there similar to header-styling.

    #936198

    Hi there :-) ,

    thank you for all your replies. Awesome!

    @ Guenni007: Yes, what I mean in single blog post if I have category a it will be default – and if it is category b it is elegant. Unfortunately I do not use ALB for my posts since I need to show up the “You might also like” and this is not possible in standard editor.

    So I assume it it is still not possible?

    Thank you for all your efforts. Have a great day!

    Kind regards,
    Sophie

    #936791

    Hi,

    The best option is to actually use ALB and then make the ” You might also like ” as shortcodes.
    That could help you the best.

    Best regards,
    Basilis

    #937166

    Hi Basilis,

    thank you for your reply. I’ve never found this ”You might also like” shortcode. Where do I get this? Because that was the reason I’ve used Standard Editor from the beginning :-( .

    Kind regards,
    Sophie

    #937619

    Hi Sophie,

    Here are some thread for you to consider

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #937626

    Hi Victoria,

    thank you for the threads. I thought I could have layout for “You might also like” like here in your demo: https://kriesi.at/themes/enfold-2017/2015/01/24/a-small-gallery/. I guess this is not possible via ALB?

    Thank you for your kind help in advance.

    Best regards,
    Sophie

    #938011

    Hi Sophie,

    This is a post made with the Default editor and related posts are displayed at the bottom, so automatically this will not be added to the posts built with Advanced Layout Builder.
    But the first link above has a solution on how to add related posts template to template builder and so the related posts should be added to all posts. Have you tried that?

    If you need further assistance please let us know.
    Best regards,
    Victoria

    • This reply was modified 6 years, 7 months ago by Victoria.
    #938367

    Hi Victoria,

    the code from this thread https://kriesi.at/support/topic/blog-posts-related-posts/#post-447533 did it! Awesome! Thank you so much! But, when I add comments element, the comments are showing up above”You may also like” and not below.

    Can you tell how to change? Thank you in advance.

    Kind regards,
    Sophie

    #938988

    Hi Sophie,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? We need to see where you actually added the code.

    Best regards,
    Victoria

    #942576

    Hi Victoria,

    yes, please kindly find the login details in the private content box and look for post “TestpostALB”. I edited template-builder.php, looked for this code

    echo $content;
    

    and below I added

    //show related posts based on tags if there are any
         if(is_singular('post')) get_template_part( 'includes/related-posts');

    Thank you for your kind help in advance.

    Best regards,
    Sophie

    #943349

    Hi,

    Thanks for the update. Remove the comments element from the advance layout builder and then replace the template-builder.php modification with the following.

    if(is_singular('post')) {
        //show related posts based on tags if there are any
        get_template_part( 'includes/related-posts');
    
        //wordpress function that loads the comments template "comments.php"
        comments_template();
    }

    Best regards,
    Ismael

    #945103

    Hi Ismael,

    awesome, that is working :-) . Just 2 issues: Now there is a small separator line above the “You might also like” and the 6 posts that are showing up for “You might also like” are not centered like in your demo https://kriesi.at/themes/enfold-2017/2012/05/24/a-nice-post/. It’s not occuring when using Standard Editor.

    Please kindly see the link to my test post in private context box. Hope you can help. Have a great day.

    Kind regards,
    Sophie

    #945713

    Hi,

    Glad it worked. Use this css code to remove the top border and to align the items to the center.

    .template-page .related_posts {
        border-top: 0;
        padding: 23px 25px 33px 25px;
    }

    Best regards,
    Ismael

    #945881

    Hi Ismael,

    thank you for the CSS. I changed the CSS to different padding left and right:

    .related_posts {
        border-top: 0;
        padding: 23px 0px 33px 0px;
    }

    Nearly got it: This works for ALB-posts with ”You might also like” shortcode, but on posts with Standard Editor the a/m CSS puts the related entries container to the outermost right margin with nearly no whitespace to the right sidebar. Please kindly see the links in the private content box.

    Maybe it’s just a small issue to be found, but I cannot find out :o( . Maybe you can be of help for me? Thank you so much for all your kind efforts.

    Best regards,
    Sophie

    #946398

    Hi,

    We adjusted the css code so it won’t affect posts that are created with the default editor. Please try it again.

    Best regards,
    Ismael

    #947955

    Hi Ismael,

    thank you so much, that is working fine :-) . Just one small issue: To get in an ALB post a H1 post entry title and small separator like in posts via Standard editor, do I need to add special heading element in H1 with separator element? Also, I am using WP Recipe Maker plugin; it is not displaying when using ALB, but only in Standard editor, can I change that or is it only working when using Standard editor?

    I am so happy we could nearly solve it and I am really looking forward to receiving your message for my last 2 issues in this matter.

    Thank you so much for all your efforts.

    Kind regards,
    Sophie

    #948892

    Hi,

    Thank you for the update. What is the post type name of the WP Recipe Maker plugin posts? Please ask the plugin author. Use this filter to activate the ALB for that particular post type.

    /* Add ALE to custom post types */
    add_filter('avf_builder_boxes', 'add_builder_to_posttype');
    function add_builder_to_posttype($metabox) {
      foreach($metabox as &$meta) {
        if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') {
          $meta['page'][] = 'WP RECIPE MAKER CUSTOM POST TYPE NAME';
        }
      }
      return $metabox;
    }

    Yes, you can use the special heading element.

    Best regards,
    Ismael

    #952376

    Hi Ismael,

    thank you so much for the code. I asked the plugin author and was told to use the custom post type wprm_recipe which I added to your above code for putting it to functions. But, how can I use a recipe in a post with ALB now? I mean where to add in an ALB post?

    Thank you for all your efforts in advance. Really do appreciate that!

    Kind regards,
    Sophie

    #953115

    Hi,

    But, how can I use a recipe in a post with ALB now? I mean where to add in an ALB post?

    I’m not sure what you mean by that. The code above should enable the ALB (Advance layout builder) for the custom post type “wprm_recipe”. Instead of the default editor, you’ll be able to use the ALB for that particular post type.

    Best regards,
    Ismael

    #954613

    Hi Ismael,

    sorry if I expressed myself unclearly. In Standard Editor there is a button for WP Recipe Maker plugin. By clicking on this button I am able to insert a new recipe etc. When using ALB there is no such button. Please kindly see screenshots in private content box.

    Hope you understand better now what I mean. Thank you for all your efforts in advance.

    Kind regards,
    Sophie

Viewing 30 posts - 1 through 30 (of 35 total)
  • The topic ‘Two different blog stylings for single blog posts?’ is closed to new replies.