Community Forums › Forums › Archived Forums › General Discussion › How do I edit a page template with a child
- This topic has 11 replies, 6 voices, and was last updated 9 years, 6 months ago by partisan.
-
AuthorPosts
-
August 17, 2014 at 1:53 pm #119399rreeveMember
Now I'm really confused.
Whenever I've needed to make changes to a template in the past, I copy the template file into my child theme and make my changes. However, I've just attempted to do this with Genesis and none of the templates contain anything ????
For example, inside the single.php it just says:
//* This file handles single entries, but only exists for the sake of child theme forward compatibility.
genesis();I've now haven't got any idea how to edit these pages or even how to create my own template pages. I thought the whole idea of a framework was to make it easier to customize WordPress themes but this just makes everything harder. If I wanted to learn php, I would stick to the wordpress default theme and make my own changes from there. This seems counter intuitive.
rant over
August 17, 2014 at 4:35 pm #119416RobGMemberIf you're using a Genesis child theme yes it's quite simple to edit or make any custom changes. You can style your child theme by accessing your Style.css file or if you want to change or add functions, then edit your Function.php file. Simple
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossAugust 17, 2014 at 6:39 pm #119426Sridhar KatakamParticipant@rreeve Those were my exact thoughts a few years ago when I tried Genesis the first time. But I re-visited, understood how Genesis works and there's turning back.
Can you give an example of the change you want to make, say in single Post pages?
August 18, 2014 at 1:19 am #119473rreeveMemberA few years ago, I first used Genesis too and I thought it was great back then. It actually made sense using a framework because It was MUCH easier to use back then but now it appears to be counter intuitive because if we are expected to learn PHP, what is the point of using a framework when you can just build your own theme if you know how to write php. I'd be surprised if Matt Mullenweg endorsed Genesis today.
@Sridhar Katakam I will tell you what I'm trying to do which should be pretty straight forward
I need to add a simple 2px border around single post pages (just like this forum) but ONLY for a custom post type. Not every single post page. Now normally, I would need to add it's own template and then style it.Also, I am finding it impossible to build a custom homepage that uses the normal header, navigation and footer with a widgetized content area in the middle that is the FULL BROWSER width. (Again, just like the Studiopress homepage) Normally, this is very easy to do but not with Genesis.
August 18, 2014 at 1:27 am #119478rreeveMemberI've noticed both of these issues I have, have been answered in another thread,
Thank you SridharAugust 18, 2014 at 1:31 am #119479Sridhar KatakamParticipantIn my earlier message, I meant to write
"But I re-visited, understood how Genesis works and there’s no turning back."
Glad you found answers to your specific questions.
August 18, 2014 at 4:00 am #119502rreeveMemberThank you Sridhar, you have been VERY helpful. Your answers have encouraged me to stick with Genesis for a bit longer and to try understand it a bit better. I really do appreciate your help and advice.
August 18, 2014 at 5:05 am #119505Ben @ Inbound CreativeMemberThe best thing to do rreeve is look through some Genesis child themes – especially the official ones. They tend to be commented pretty well.
Those comments will explain what each line does.
If you really want to know what the point of learning to use a framework over a bog standard WP theme is, consider this.
A year ago, before all our themes became based on Genesis, it could take up to eight weeks to develop a website.
Today, we've got it down to two to three weeks. By the end of the year, I'm hoping our internal processes will get that down to one to two weeks.
That's because a framework does a lot of the grunt coding for you, leaving you to make the changes you need to get the functions you want.
The reality is that if you want to do anything in web development, you're going to need to learn how to use PHP and JS, framework or not.
August 18, 2014 at 11:29 am #119559DTHkellyMemberUnderstanding what is automatically included by
(genesis);
helps explain why Genesis tutorials (by independent developers) to modify output use remove_action, add_action - in a page template, above
(genesis);
.Anything from
(genesis);
that is not removed from page template will show. Same with anything added beyond(genesis);
Also explains why (many) Genesis childthemes do not including single.php.
April 29, 2015 at 7:47 pm #149568partisanMemberHi everyone,
so i'm very new to Genesis and very frustrated too. I don't get the hype. I'm wondering if I've made a big mistake by trying out Genesis for a new client website. Should I throw in the towel now before I get further in the weeds and save Genesis for when I have infinite time and patience? Sorry for the rant, but the learning curve is making me feel stupid and stressed.I want to add bootstrap class to the html template markup but I have no idea where or how to do that. Sure, I can customize tons of stuff in CSS but not if I don't have the classes in the html or the html structure in the first place. Everyone talks about adding and removing hooks but what about altering the default content?
If you have lots of customizations, doesn't your functions.php become super long difficult to manage?
I'm using the sample theme. The first thing I want to do is to create a full width hero template and several different types of archive templates. Normally with WordPress, I would copy a parent template to the child theme and the alter, but as the initial post on this thread mentions, there's nothing to copy.
Where do you start in customizing the layout??
Thx,
MichaelMay 3, 2015 at 10:41 pm #150064Sridhar KatakamParticipantMichael,
I want to add bootstrap class to the html template markup but I have no idea where or how to do that.
genesis_attr
filter may be the answer to your question.Here's an example of adding a custom ID to
site-inner
div:// Add an ID to .site-inner add_filter( 'genesis_attr_site-inner', 'custom_attributes_content' ); function custom_attributes_content( $attributes ) { if ( is_singular('post' ) ) { $attributes['id'] = 'site-inner'; } return $attributes; }
Refer http://www.rfmeier.net/using-genesis_markup-with-html5-in-genesis-2-0/ and https://gist.github.com/salcode/7164690
If the above is not clear or does not help in what you are trying to do, please provide screenshots of the markup before and after and I will do my best to answer.
May 7, 2015 at 5:02 am #150557partisanMemberThanks Sridhar. I appreciate it!
Michael -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.