WordPress.org

Ready to get started?Download WordPress

Forums

Frisco for BuddyPress
[resolved] custom.css & functions-custom.php gone after upgrading to 1.6.12 (7 posts)

  1. yangman
    Member
    Posted 1 year ago #

    I wonder is it just me.....I upgraded to v1.6.12 this morning and found that custom.css and functions.php file are not there. Luckily I have backed up all files otherwise another day will be wasted trying to get back the looks of my site.

    Now is a child theme really necessary?

    I also have register.php, header.php and functions.php modified to suit my site needs, if I choose to keep these files and upgrade (manually) to v1.6.13, will I encounter any problems?

  2. yangman
    Member
    Posted 1 year ago #

    Forgot to add......

    The register.php and functions.php were originally not included in the previous Frisco version (v1.5.04). I've added them to the theme's root directory for customization of the sign up page functions.

    The customizations are such;

    register.php - All sign up functions are themed in one place, including lost password, reset password, sign-in...meaning the user will stay at the same Sign-In/Sign Up page regardless of what he did with the Login fields.

    functions.php - I have created a 'My Profile' menu position along the main nav bar with the following code inserted at the end of functions.php before '}' and after '?>'

    // Filter wp_nav_menu() to add profile link
    
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {
    	if (!is_user_logged_in())
    		return $menu;
    	else
    		$profilelink = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('My Profile', 'buddypress' ) . '</a></li>';
        		$menu = $menu . $profilelink;
        		return $menu;
    }

    Now since v1.6.13 have a functions.php file, can I simply insert this code in it?

  3. codegene
    Member
    Posted 1 year ago #

    As per theme documentation it is advised that you create functions-custom.php file in the main theme directory and paste your code there so that you do not lose the changes when the theme is updated.

  4. yangman
    Member
    Posted 1 year ago #

    @codegene

    Thanks for your reply.

    That's what I thought but the functions-custom.php and custom.css disappear when I upgraded to v.1.6.12. I have to manually paste back the files. Imagine if I don't have a backup copy of both files when I did the upgrade.

  5. David Carson
    Member
    Theme Author

    Posted 1 year ago #

    I upgraded to v1.6.12 this morning and found that custom.css and functions.php file are not there.

    @yangman - I will clear up the instructions and warnings about upgrading to the next update to the theme. I realize the previous/current instructions are confusing. My understanding was that these files would not be removed when upgrading but I've misunderstood how the automatic dashboard upgrader works for themes.

    When you perform an automatic upgrade of the theme from within the dashboard, it's going to replace the previous version of the theme with the new one and you'll need to re-implement your customizations (ex. custom.css and functions).

    I had also assumed that most people create backups before upgrading and understand how to restore their customizations after a theme upgrade if the files were removed. But this should probably be clearer to all users.

    This article might be helpful - http://wpmu.org/how-to-upgrade-a-wordpress-theme-even-if-its-customized/

    Now is a child theme really necessary?

    The Frisco theme is a child theme of the default BuddyPress theme because it was much faster to create it that way and made it much easier to keep up with BuddyPress updates. The theme was never meant to be a perfect or even close to perfect theme. I'd describe it as "kind of decent". I made it for myself and then just released it hoping it might be helpful to others or at least provide a template for others to start making their own BuddyPress child themes.

    I have to manually paste back the files. Imagine if I don't have a backup copy of both files when I did the upgrade.

    You should always have backups - especially when you're upgrading. This is your responsibility.

  6. yangman
    Member
    Posted 1 year ago #

    @David Carson

    Look forward to the next upgrade, and thanks for sharing this less-than-perfect theme. I'm grateful for your support, always. :)

  7. Strapontin
    Member
    Posted 1 year ago #

    @yangman

    for upgrade edited/modified theme you can use Winmerge.
    it's perfect tool.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic