Tagged: custom page template
- This topic has 86 replies, 12 voices, and was last updated 10 years ago by
batsteek.
Author | Posts |
---|---|
Sebastian
March 15, 2015 at 7:38 am
|
Heads up! this post was created when Microthemer was at version 3. The current version is 7. Some references to the interface may be out of date. Hi David, I’ve made added this feature to the list. I think this feature probably belongs on the targeting tab (at the bottom underneath the CSS selector suggestions perhaps). Because although useful, it won’t be needed all the time by all types of user. I think a dropdown (jQuery combobox that filters the list as you type) with the current selector preselected could be good. Thanks again for sharing your thoughts. |
Gaetan
March 16, 2015 at 9:29 pm
|
Hi Sebastian, I have a feature request: Of course i can make specific page/post modifications already, but changing the header and or the footer will have a sitewide effect. A workaround for now is to use a plugin that allows for page/post based custom css, make edits in microthemer, not save nor export them but just copy the css and past it in the specific plugin. I dont know if it is doable and how you envision future development of Microthemer, i think this feature would greatly enhance the power of your product (think inet marketeers that need salespages) in comparison to other wp css editors. |
Sebastian
March 17, 2015 at 7:13 am
|
Hi Gaetan, I see where you’re coming from, but I think the problem might be best tackled from a different angle. Almost all modern WordPress themes output classes in the body tag that are unique to the particular page e.g. (.postid-5659) or type of page e.g. (.bbpress-page). So it is actually possible to style the header and footer differently on specific pages. You might have something like the following to target just the header on this forum thread:
Or something like this to target the footer on all forum pages:
The selector wizard doesn’t currently make adding body classes easy. But it will in an upcoming release. The suggestions in the selector wizard will be presented in a combobox instead of a simple textarea. So you can chose a variation of the selector that might be page-specific (prepended with body classes) or incorporate a pseudo selector (appended with :hover for instance). You might like to create a folder for your page specific style to keep things organised. I think this approach might be quickest and easiest to maintain. What are your thoughts on that? Cheers! Sebastian ps if your theme doesn’t output these classes it can be made to by updating the body tag in your theme (which might be in header.php) to:
|
Gaetan
March 17, 2015 at 11:54 am
|
Thanx for laying out the procedure, i got the idea when i was working with a non page specific classes outputting theme (default twentythirteen) or at least not to my knowledge and was kind of stuck unable to select page specific header attributes. Basicly you’re saying that what i want to achieve is already very possible with the current Microthemer and will be even more easy with the next update (selector wizzard) Good to hear! Sticking to twentythirteen: can not find the place where to put the snippet yet, it might use a different name for “body” or else i havent found the right file yet. Keep up the good work. |
Sebastian
March 18, 2015 at 12:53 pm
|
Hi Gaetan, I’ve just downloaded the latest Twenty Thirteen (version 1.4) and I can see that it already has the following code on header.php on line 33:
Are you using an older version of Twenty Thirteen perhaps? If so, please feel free to email me a zip file of your version of the theme and I will hunt down the body tag for you. Cheers, |
Gaetan
March 19, 2015 at 11:07 pm
|
Hmmm you are right, it is already there! So prepending a page specific body class would do the trick, that is good! Thanx for looking into it |
Sebastian
March 20, 2015 at 3:33 am
|
You’re welcome. |
batsteek
March 25, 2015 at 8:05 am
|
Someone already requested and I’m in too : Import existing (pre-formated with sections) standard CSS would be awesome to create perfect design packs. |
Sebastian
March 27, 2015 at 10:34 am
|
I hear you ๐ |
batsteek
March 28, 2015 at 3:35 pm
|
Another request ๐ When I create a WP theme, I don’t want to rely on the media library for the images that I put in my styles but on an external resources folder. Currently, It seems that I cannot use a path in the background image section and so, I must use the media library OR create my style by typing code. Not good ๐ I guess its an easy one to allow the users to enter a path in MT interface ? |
Sebastian
March 30, 2015 at 5:31 am
|
Hi Batsteek, I do see your point here. One of our philosophies is to make the same things achievable in Microthemer that are achievable when writing code by hand, so we’ll have to address this. The reason the image insert fields don’t currently allow hand-typing is that I didn’t want users to think that they could just change the name of an image an expect things to always work. Because under some circumstances this wouldn’t work. Imagine that the user has image1.png and image2.png in their media library. If they initially insert image1.png but later manually rename this to image2.png it may work fine, but it wouldn’t work if this was the full image path for the two images:
The images are in different folders because they were uploaded in different months (Feb/March). Changing just the name would lead to a 404 not found error. So I’m thinking the best solution might be to keep text editing in image fields off by default, but have an option in the preferences where web devs can enable direct editing for the purpose of inserting custom image paths. I can tell Microthemer to check for the presence of :// (as in http://) or the first character being / so that you can include root relative paths or full paths. Does that sound OK to you? Cheers, |
batsteek
March 30, 2015 at 7:09 am
|
Thanks for your answer @Sebastian ! I definitely agree with your thinking and … I’m ok with the solution ! CheerS. |