Community Forums › Forums › Archived Forums › General Discussion › Total Newbie – Confused about Child Theme
- This topic has 22 replies, 2 voices, and was last updated 9 years, 9 months ago by Lauren @ OnceCoupled.
-
AuthorPosts
-
August 6, 2014 at 2:11 pm #117404losetheflameMember
Do I copy over the Genesis files (index.php, header.php ...) to the child theme? Since there isn't any? It says don't change on original .. do it in a child theme...so do I just copy what there is in the parent and add as I need to? the parent index.php doesn't have much code anyways. Sorry - just confused. I've never used parent/child themes before.
http://www.scentswarmers.comAugust 6, 2014 at 2:16 pm #117406Lauren @ OnceCoupledMemberYou don't need those files, since your child theme will be calling the parent's files. Your child theme might just be a style.css file and that's all, for instance. A good child theme starting place is to download the Sample Theme and edit that.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 2:20 pm #117407losetheflameMemberthanks for helping! I was going to adjust some code and needed to adjust it in index.php per the instructions and I didnt have it. I have the genesis sample theme, yes, that's the one I'm using here: http://www.scentswarmers.com
August 6, 2014 at 2:21 pm #117408Lauren @ OnceCoupledMemberSure, if you need to make changes to index.php you could copy the file over and then make your edits. 🙂
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 2:25 pm #117409losetheflameMemberbut in the Genesis theme (parent) the index.php doesnt have much in it at all..and the instructions say to find the excerpt section.. then edit it.. I don't even see the code in there. I don't want to give up on Genesis, but I'm having a tough time figuring out where all my code is. 🙂 I love your blog by the way, I just subscribed.
August 6, 2014 at 2:37 pm #117410Lauren @ OnceCoupledMemberCan you send me the tutorial you are following? I think that will help my understand what you need!
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 2:39 pm #117411losetheflameMembersure, it's here: http://www.elegantthemes.com/blog/tips-tricks/how-to-customize-the-wordpress-read-more-link-text
if you scroll down it show to edit index.php..
August 6, 2014 at 2:45 pm #117412Lauren @ OnceCoupledMemberOK! So, the reason you're not seeing the same code is because that theme they're using isn't a Genesis theme. Actually, what you're trying to do is probably a lot easier than their tutorial.
Sorry to play 20 questions here, but can you explain what you're trying to accomplish by reading that tutorial? Are you trying to change the text of your "read more" links, to style them a certain way, or to edit the length of your teasers? It may just be more straightforward for me to help you with that specific question.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 2:49 pm #117414losetheflameMemberawesome! I'm going to change it to NOT show all content, but to show excerpt in genesis theme settings.. but I wanted to customize the way the "read more" displays.. I'd rather it be a button than just a link...
August 6, 2014 at 2:52 pm #117415Lauren @ OnceCoupledMemberOK, go into your Genesis settings and change it to display excerpts rather than full posts. Once you've got that set up the way you want, let me know and I'll send you a block of CSS to add to your style.css file - which will make your read more links look like buttons. 🙂
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 2:55 pm #117417losetheflameMemberI don't even see the "read more link" ... I just updated the settings.. but as you can see here... http://www.scentswarmers.com/scentsy-blog there's no link at all.. Not normal, right?
August 6, 2014 at 3:13 pm #117420Lauren @ OnceCoupledMemberYou're right, I'm not sure what's happening without being able to look at the settings or check the code. Try changing the setting from "excerpt" to "content limit" and setting a certain character amount. If that still doesn't fix it, email me directly: [email protected] so I can login and see what's going on first-hand.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 3:14 pm #117421losetheflameMemberthat did it.. now I have the read more link...
August 6, 2014 at 3:17 pm #117423Lauren @ OnceCoupledMemberOK, good to hear! That must be what the default excerpt has - I use the same starting code for all of my sites and one aspect is to change the "read more" text.
Start off by adding this to your functions file: http://my.studiopress.com/snippets/post-excerpts/#content-limit-more-link and editing the "[Continue Reading]" part. It can say whatever you want; we want to get rid of the brackets.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 3:22 pm #117424Lauren @ OnceCoupledMemberTo make your link a button, add the following code to your style.css:
.more-link { display: block; float: right; background-color: #328A91; padding: 10px 20px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .more-link:hover { background-color: #AAA; } a.more-link { color: #FFF; }
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
August 6, 2014 at 3:24 pm #117425losetheflameMemberI just broke something. krap. white screen.
August 6, 2014 at 3:27 pm #117426losetheflameMemberkrap.. what'd I do? here's my functions.php right now
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.1.2' );//* Enqueue Google Fonts
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
function genesis_sample_google_fonts() {wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION );
}
//* Add HTML5 markup structure
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Add support for custom background
add_theme_support( 'custom-background' );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );}
August 6, 2014 at 3:31 pm #117430losetheflameMemberokay, fixed that.
August 6, 2014 at 3:35 pm #117434losetheflameMemberokay, so I got the "view full post" in there.. but adding the css did noting... weird.
August 6, 2014 at 3:36 pm #117436Lauren @ OnceCoupledMemberGood to hear that. It looks like you may have just had an extra closing bracket. In the future, you can post code blocks inside the code tags (there's a button in the editor) to keep it more readable, or create a Github gist if it's really long.
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.