- This topic is empty.
-
AuthorPosts
-
February 22, 2014 at 6:20 am #163724broomhandleParticipant
Err, I don’t want the sidebar on that page anyway, is that just an example of how to add it back in?
February 22, 2014 at 8:34 am #163726broomhandleParticipant@wolfcry911 thanks.
February 22, 2014 at 9:00 am #163729broomhandleParticipantI’m trying to follow this: http://www.chipbennett.net/2010/11/01/oenology-how-to-create-a-child-theme-and-a-custom-page-template/ “Creating a Custom Page Template” to create a custom template that omits the sidebar.
Then I will remove the CSS that hides the sidebar, and apply the custom template to the non-Blog pages.
I’ve copied page.php to my child theme folder, but I can’t find
<body id="page" <?php body_class(); ?>>
or anything similar.February 22, 2014 at 9:15 am #163730broomhandleParticipantOk, it’s shaping up nicely! I’ve put the 13px
margin-bottom
in for the headers, does that look alright?Another thing I wanted to do is replace the blog page numbers with an “Older posts” button, like it is on .com http://peterchamberlaincann.wordpress.com/blog/
February 22, 2014 at 9:22 am #163732broomhandleParticipantThen I will remove the CSS that hides the sidebar, and apply the custom template to the non-Blog pages.
Hmm, will be trickier than that, cos if I remove the “sidebar-hiding CSS” I will end up with 520px margins all round. I need a condition that sets pages with the “without sidebar” template to have 720px margins. Or something.
February 22, 2014 at 9:36 am #163735broomhandleParticipantI just changed
.entry-title { line-height:
from 1.8em to 20px, based on the .com site, so that the blog headers will line up with the top of the sidebar.That worked, but it has now made the gap below the header smaller. :(
And the gap at the bottom of each page and post, before the footer, is now larger as well.
February 23, 2014 at 6:12 am #163790broomhandleParticipantConfusing lol. I will try and edit the
tiled-gallery.js
All of the posts back to:
Additionally, I noticed there is an approx 2px gap to the right of the Portfolio gallery, presumably because the images don’t quite fill the 720px margins.
are still relevant, I haven’t sorted those things yet. :D
I have tried to create a new template by copying the page.php from the parent to the child and editing it so it has the new name.
It seems to have worked, because I have Portfolio set to the new “Without sidebar” template and there’s no problems.
Now I just need to work out how to remove the sidebar using the template.
February 23, 2014 at 6:44 am #163792broomhandleParticipantI’m looking at tiledgallery.js but not sure what needs removing, do you think you could put the whole thing in Pastebin or on here as it should be?
February 23, 2014 at 6:49 am #163793broomhandleParticipantWordPress spits out these classes on the body-tag, depending on which template e.o., so that condition is build in to the CMS. So you can do for instance:
Expanding on this… I want page to have 720px margin, blog post to have 520px. I can work out which code I need for that. If pages are set to 720, posts to 520, how will that work for the Blog?
February 23, 2014 at 7:03 am #163795broomhandleParticipantThanks.
It’s the 2px gap beside Portfolio and this:
I just changed .entry-title { line-height: from 1.8em to 20px, based on the .com site, so that the blog headers will line up with the top of the sidebar.
That worked, but it has now made the gap below the header smaller. :(
And the gap at the bottom of each page and post, before the footer, is now larger as well.
that I’m trying to sort now.
Also… standard images that are bigger than 520px automatically resize to fit. Ones that are smaller, I just align to center.
But for the tiled galleries, they don’t stretch to 520px anymore, they’re about 500, no idea why.
February 23, 2014 at 7:08 am #163797broomhandleParticipantYes, blog means http://www.peterchamberlaincann.co.uk/blog/
I’ll check regarding
single.php
. -> yep looks like it does.February 23, 2014 at 7:31 am #163800broomhandleParticipantOk, I’ll go and find the inline css bit!
I’ve put the “green/yellow” code in. It’s done it for the pages, but not the posts, I presume because I haven’t added a
.single-post
class to the blog posts?I’ve just thought though, as soon as the sidebar is removed, the content defaults to 720 margins anyway. So will there be any need to set up this condition?
February 23, 2014 at 7:33 am #163801broomhandleParticipantAnd when you say media queries, do you mean the
@media only screen
block code you posted earlier, or was that generic stuff? Lol.February 23, 2014 at 7:43 am #163804broomhandleParticipantWhen you go back some pages in this thread, you will see my answer to that question, (hint: inline CSS injected by javascript).
Nope, you’re gonna have to tell me which post I’m afraid, I can’t find it. :P
I think that
data-original-width="500"
sounds like what I want though.I’ve found the file with that in and I’ll change the value and see what happens. Found a post elsewhere and someone’s done the same. Only problem, it’s in the Jetpack files, so if the plugin updates, won’t it wipe that changes (also tiledgallery.js changes as I mentioned before).
February 23, 2014 at 7:50 am #163806broomhandleParticipantWell, I changed
data-original-width="500"
to 520 and it hasn’t done anything.Thought I just had though, I want the galleries to adapt to any page width ideally, because on standard pages with no sidebar, they are still stuck at 500px as well. So would that be a “100%” thing?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.