Support » Theme: Themelia » Custom template and sidebar

  • Resolved Oystein

    (@oystein)



    Hello! First of all; thank you for this great theme for WordPress. I really enjoy working with it.

    I want to make a custom template with a sidebar that is wider than the standard “primary” sidebar. I’ve done this before with other themes but it seems to be a litle bit different with Themelia.

    Can I add the sidebar in functions.php and in the page template? When editing a page I can only select layouts, not templates. I did see something about layouts in inc\themelia.php, do I have to make any changes to this file?

    I guess the sidebar and content width must be changed/added to style.css?

Viewing 1 replies (of 1 total)
  • Theme Author dariodev

    (@dariodev)

    Check this example template https://pastebin.com/7AQ7yLkW and compare it with index.php. In index.php attributes for content and sidebar are added via hybrid_attr() function. But instead using hybrid_attr() you can skip this function and add attributes directly like in this example.

    Layout is built with use of Unsemantic CSS framework. Check documentation here https://unsemantic.com/css-documentation to understand classes. It is very simple. In short: There are grid classes named grid-x where “x” is a number that represents the percentage width of each grid unit. These cover multiples of 5, up to 100 — grid-5, grid-10 … grid-95, grid-100. There is also a corresponding tablet-* class. They are applicable between 1300px and 900px. And mobile-* class below 900px. (you are free to change @media query values in css/unsemantic.css file)

    In the example template you will see that main column has classes “grid-70 tablet-grid-66” and sidebar “grid-30 tablet-grid-33”. For instance if you want wider main column you may use classes “grid-80 tablet-grid-80” and for sidebar “grid-20 tablet-grid-20”.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom template and sidebar’ is closed to new replies.