Viewing 6 replies - 1 through 6 (of 6 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    If you have not yet done so, I would suggest creating a child theme so that any customizations you make will not be overwritten by a future theme update. Alternately you can use the Edit CSS function in the Jetpack plugin, or use one of the other Custom CSS plugins that will keep CSS changes from being overwritten.

    Child Themes
    Child Theme creation plugins
    Jetpack plugin
    Custom CSS plugins

    If you look at index.php, you will find that right before the footer php it calls sidebar.php, and if you look at portfolio-page.php, you will find that it does not call sidebar.php. You will have to add that line above the footer call. You will likely have to also make adjustments to the CSS to allow for the sidebar.

    Thread Starter copeders

    (@copeders)

    Hi!

    I have added the sidebare.php call to the portfolio-page.php, like you described, but nothing changes. I guess I have to make adjustments to the CSS, like you say. I guess I have to overwrite some of the code underneath, but I have too little experience to know what code to overwrite it with in my custom CSS sheet. Can you help a bit more? ??

    .page-template-fullwidth-page-php .site-content,
    .page-template-fullwidth-page-php .content-area,
    .page-template-fullwidth-page-php .site-main,
    body[class*="jetpack-portfolio"] .site-content,
    body[class*="jetpack-portfolio"] .content-area,
    body[class*="jetpack-portfolio"] .site-main,
    .no-sidebar .site-content,
    .no-sidebar .content-area,
    .no-sidebar .site-main  {
      margin: 0 auto;
    }
    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi, I’m seeing a sidebar on https://en.1001makron.com/?portfolio=base-recipe right now, so you got this figured out?

    Thread Starter copeders

    (@copeders)

    Hi!
    I kind of solved it. I put /* */ directly into to style.css like this:

    .page-template-/*fullwidth-*/page-php .site-content,
    .page-template-/*fullwidth-*/page-php .content-area,
    .page-template-/*fullwidth-*/page-php .site-main,
    body[class*="jetpack-portfolio"] .site-content,
    body[class*="jetpack-portfolio"] .content-area,
    body[class*="jetpack-portfolio"] .site-main,
    /*.no-sidebar .site-content,
    .no-sidebar .content-area,
    .no-sidebar .site-main {
      margin: 0 auto;
    }*/

    I would have loved to do this in my custom CSS sheet instead, but I don’t know what to write to do the same as above. (At least I am Learning a bit ??

    The comments effectively remove any CSS within the /* */. Based on the comments you added to the CSS, the following elements will be assigned the values in the next block of CSS:

    .page-template-page-php .site-content,
    .page-template-page-php .content-area,
    .page-template-page-php .site-main,
    body[class*="jetpack-portfolio"] .site-content,
    body[class*="jetpack-portfolio"] .content-area,
    body[class*="jetpack-portfolio"] .site-main,

    Since any changes will be overwritten when the theme is upgraded, we highly recommend that you add these changes to a child theme or you can safely change the CSS from Appearance > Edit CSS

    Moderator Kathryn Presner

    (@zoonini)

    Looks like you’ve managed to get the sidebar on your portfolio project pages so I’m marking this as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Widget area on project/portfolio pages’ is closed to new replies.