• Hello there,

    I’m running twenty seventeen on a child theme and I’m really happy with it. ??

    That being said, I would like to implement a full-width photo-page (not .blog or home) on a single page. In order to do so I created a full-width page.php template using the following code that I was happy to find on gist-hub:

    https://gist.github.com/Netzberufler/792a74d63f24aadcad444f4c9d415c11

    Despite being supposedly full-width the page still seems to be two-column and calls the twenty-seventeen sidebar that shows either on the left side of the content (without .css alterations) or above it (with .css changes made in the customizer).

    Since I am unfortunately not a designer I am stuck at this point. Would anyone kindly point me in the right direction on how to make the right changes in either the php or the css or both to get the full-width appearance without sidebar?

    My site is tamingmymonkey.com; the concerned page is called test-full-width.

    Any help is greatly appreciated. Thank you. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter juliatmm

    (@juliatmm)

    Sorry, I wanted to say: Showing sidebar on specific page… OR sidebar shown on… not both. Shit happens, I guess ??

    the sidebar issue does not seem to be related directly to the code from the github;
    rather it seems that the sidebar code is somehow injected into the <header class="entry-header"> possibly of the /template-parts/page/content-page.php file … ?

    have you made any other edits to the file template-full-width.php ?

    I can also not find the CSS from the github anywhere in your site…

    Thread Starter juliatmm

    (@juliatmm)

    Hello Michael,

    thank you for taking precious time to look into this.

    Well, I did create new files for the child theme’s content-page.php, content-front-page.php, and content-front-page-panels.php in the template-parts folder following the instructions given by wpmu here ( https://premium.wpmudev.org/blog/five-hacks-twenty-seventeen/?utm_expid=3606929-105.kKHVTz43T_CV513Vo9oSow.0) for creating custom sidebars. So you think the culprit might be found here? Thanks for pointing that out!

    Apart from that I didn’t edit the code from the github in the template-full-width.php.

    Regarding the CSS I didn’t save it after watching what it did in the customizer’s preview function but have now saved it, it is online now.

    Since I unfortunately don’t know anything about coding I’m at a bit of a loss what to look for or edit in the template-parts folder. Could you kindly give me another hint what
    to remove/ edit/ alter, because I don’t dare touching it without clear instructions?

    Thank you so much for your time and guidance. I’ll leave the site online for tonight (Europe) just in case you would like to take another look.

    Thank you so much, your help is very much appreciated.

    Thread Starter juliatmm

    (@juliatmm)

    Michael,

    You were right: I had a look at the content-page.php in the template-parts directory of the child and it says: <?php get_sidebar(); ?>. Right. ??

    If I understand correctly, the github code refers to the content-page.php of the child here: get_template_part( ‘template-parts/page/content’, ‘page’ );

    so the full-width layout page must naturally also get a sidebar, correct?

    Now would it help if I created a new content-page.php called content-full-width for the full-width-page without the sidebar command which I would then place in the template-parts-directory and which would then be referred to in the edited git-hub-code? Could the reference in the git-hub-code say something like this: get_template_part( ‘template-parts/page/content-full-width’, ‘page’ );

    Do I make sense here or is this complete and utter nonsense?

    I think I can’t edit the general content-page.php for I need the code as is for the other pages, so I have to create a new one. Is that correct?

    Thanks for your advice and patience!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘showing sidebar shown on specific page despite full-width template’ is closed to new replies.