Before you ask please READ THIS

Customisable layout for multiple blogs on same site possible?

edited May 2015 in Blame Posts: 47
Hi Air,

We bought your Blame theme again for another project :-)
This time we are making a website for a primary school. What we want to achieve is for every class to have it's own blog. I have achieved this by making a category for every class. When making a blog entry the relevant category must be tagged.
Then to access the blogs from the site I have added every category to the navigation menu so when you click on (for example) "class 3" a page opens showing all blog entry where category "class 3" is selected. Basically this works well.
However, what we would like is that every class has it's own blog appearance. And this is where I get stuck.
How can I design every individual blog to have it's own appearance? Is this possible at all?
I'll send you a PM with a link to the site so you can get an idea of what I'm talking about ;-)
Thanks in advance!
Best regards,
Rutger
The Netherlands

Comments

  • AirAir
    Posts: 10,970
    Welcome back:-)

    I believe it is possible by targeting class in body element corresponding to this category which is displayed currently. However I don't see link, co can't tell for sure how it is in your case;-)

    With kind regards.
  • Posts: 47
    Hi Air,

    That's a actually a good suggestion and I found the relevant classes and played with it a bit. That works for the content of the blog. But I see now that I haven't asked my question correctly. What I mean to do is that every blog has it's own header-photo and own widget sidebar, so I can customize the blogs that way. Is that possible?
    More general question: Is the way I used categories to acomplish seperate blogs on the same website the best way? Are there other ways? Obviously if somehow I can get a blog on a normal page it would be much easier to give each blog it's own look, design and layout.
    Any thoughts are welcome :-)
    Thanks Air!
  • AirAir
    Posts: 10,970
    Hi again:-)
    rutger said: More general question: Is the way I used categories to acomplish seperate blogs on the same website the best way? Are there other ways?
    Well, in pure Wordpress way- yes it is best way, but as you can see you lose option to customize them separately just from panel, and would require some coding for every part that you would like to customize. So for example blog header images will be written in code, not chosen from panel.
    rutger said: Obviously if somehow I can get a blog on a normal page it would be much easier to give each blog it's own look, design and layout.
    Of course you can use builder for it, from attached Visual Composer. However you lose some things there(probably):
    -There is no pagination, but all posts for each blog per site
    -You lose "blame" look, and get Visual composer layout instead.

    You can test it by using Post Grid element of VC.

    With kind regards.
  • Posts: 47
    Hi Air,
    Thanks for your suggestions. First solution is probably a bit out of my coding-league.
    Second suggestion sounds good to me. Silly I didn't think about the Post Grid element myself. Probably was too focused on the blog template that I didn't think of that option.
    Thanks buddy!
    Kind regards,
    Rutger
  • Posts: 47
    Hi Air, just to let you and all other readers know how I fixed this.
    I played around with the VC Post Grid element. This worked but the loss of the blog functionality turned out to be too limiting.
    What we wanted were different sidebars with every individual blog.
    I ended up installing the plugin "Widget Logic". This plugin lets you filter the widgets to display in a sidebar. So I made one giant sidebar (the blog sidebar) which contains every widget to show in every blog. Then I filtered (in my case by category, but you can filter on many arguments) so certain widgets only show with certain blogs.
    Works like a charm.
    Only thing left is that every blog has the same background photo in the titlebar but that's fine for now.
  • AirAir
    edited May 2015 Posts: 10,970
    Nice solution , thanks for sharing.

    I have checked code of custom title bar image, and to change it you will have to do such thing, in file blame\advance\utilities\layout_parts.php line ~215, after this code:

    //global setting
    else{
    $bg_image = $a13_apollo13->get_option( 'appearance', 'title_bar_image' );
    $bg_color = $a13_apollo13->get_option( 'appearance', 'title_bar_bg_color' );
    $title_size = $a13_apollo13->get_option( 'appearance', 'title_bar_title_size' );
    $title_weight = $a13_apollo13->get_option( 'appearance', 'title_bar_title_weight' );
    $title_color = $a13_apollo13->get_option( 'appearance', 'title_bar_title_color' );
    $custom_color_1 = $a13_apollo13->get_option( 'appearance', 'title_bar_color_1' );
    $custom_color_2 = $a13_apollo13->get_option( 'appearance', 'title_bar_color_2' );
    $fit = $a13_apollo13->get_option( 'appearance', 'title_bar_image_fit' );
    $space = $a13_apollo13->get_option( 'appearance', 'title_bar_space_width' );
    }
    you will have to add something like this

    if(is_category('featured-images')){
    $bg_image = 'http://yoursite.com/011.jpg';
    }
    elseif(is_category('school')){
    $bg_image = 'http://yoursite.com/2.jpg';
    }
    elseif(is_category('category_3')){
    $bg_image = 'http://yoursite.com/033.jpg';
    }
    Just change to proper category slugs :-)

    With kind regards.
    Post edited by Air on
  • Posts: 47
    Thank you so much for diving into this deeper for me. WeI'll definitely try this technique!
  • AirAir
    Posts: 10,970
    Thanks for coffee rutger! :-)
  • Posts: 47
    Finally got around to doing this, Air. We ended up not changing the background image but the background color so I changed your suggested code accordingly. Worked well. Thanks again for pointing me in the right direction!!
  • AirAir
    Posts: 10,970
    That is great! Keep up good work :-)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion