• Resolved goldmember

    (@goldmember)


    i’m doing everything i can to employ child files for the twentyten theme files so that when the theme updates i wont have issues.

    but i want to make some modifications to the functions.php file. when i add a functions.php file to my child folder, the site no longer works.

    what’s up with that???

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter goldmember

    (@goldmember)

    thanks david. making good progress. i’m using just the 13 lines of code from http://pastebin.com/3GVj4ana and the site appears now, however my login page has some errors, and I haven’t touched any code in any wp-login.php file so i’m guessing its related to the code in this child functions.php file???

    That would be a no!

    I have created a simple child theme called Twentyten Test which you can download.

    This is an empty style.css, the twenty ten image, your function, and a sample of the ‘child_theme_setup’ which just adds a second menu location, in the file called functions.php

    It is tested and working, if it does not work on your website then twenty ten must be corrupted, if it is corrupted just download Twenty Ten and overwrite your websites twenty ten files.

    The website with the download link is my site, when you have time there are over twenty lessons to take twenty ten to this theme, look at ‘2010 Tutorial’ and ‘2010 Tutorial Two’, the second set has downloads for each step, and there will be more coming!

    They are for starter to intermediate, and I will answer comments and emails, if you get stuck.

    HTH

    David

    Thread Starter goldmember

    (@goldmember)

    That would be a no

    i know i’m definitely the novice here but when i remove the functions.php file from the remote child folder, everything works perfectly. no error messages. so how it could be something other than this child functions.php file is beyond me. but alas, i’ll re-install twenty ten parent and see what happens.

    regardless, i’ll check out the tutorial too and get learn-ed.

    Strange it works here,
    If it helps, zip up only your child theme and email it, I will have a look tomorrow evening.

    I have only tested on a local install, and will deploy it to a test website and have a look and see if I get the same message.

    Also try uploading the functions.php in the download link and see if it does the same.

    Regards

    David

    Thread Starter goldmember

    (@goldmember)

    so i uploaded your twentyten-test theme, and switched to that and it worked. then i took your functions.php functions, replaced the functions.php in MY child theme, re-established my child theme as the one to use, and now everything seems to be working. weird… there must have been some tiny typo in the previous version of functions.php that was screwing everything up???

    who knows. but its all working well now so i very much appreciate the help!

    I had a Google with the error message ant it may have been whitespace in the functions.php before or after the <?php ?>

    <?php
    Should be the first line with no whitespace ‘ ‘ before or after.

    Positives it is resolved, and you skills increased, you may want to mart the topic resolved, in the right column!

    David

    Thread Starter goldmember

    (@goldmember)

    thanks! i’ll mark resolved now. just wanted to give you a chance for one last input.

    Thread Starter goldmember

    (@goldmember)

    actually i have a similar issue, that piggy backs off this one.

    on the category pages of the site (example: http://greenrefurbishing.com/wordpress/category/coupons/), below the excerpt it shows Posted In: Category XYZ [COLOR=”Red”]| Leave a comment[/COLOR]. I want to remove everything after Category XYZ, in red above.

    But in this instance, the code that creates this functionality, as far as i can tell, is found in lines 157-161 of the loop.php file of the parent folder, not functions.php.

    <span class="meta-sep">|</span>
    				<?php endif; ?>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    				<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    			</div><!-- .entry-utility -->

    so in this instance, do i also add something to the child’s functions.php file to cancel out this function, even though it originates from the loop.php file???

    Rather than delete code, you can hide them site-wide with:
    Style.css

    .comments-link
    {
    display: none;
    }

    You would have found this in one of the tutorials, in the Hide Titles Post.

    This is a non destructive way of doing it, other may argue copy the file to the child theme and remove the line <span class=”comments-link”>..more code..</span>

    David

    Thread Starter goldmember

    (@goldmember)

    thanks so much Adeptris. i didnt get that far yet in your tutorials but i’m devoting this weekend to it.

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘can i create child functions.php file for twentyten?’ is closed to new replies.