WordPress.org

Ready to get started?Download WordPress

Forums

Spun
function.php (25 posts)

  1. kmpaperie
    Member
    Posted 1 year ago #

    I'm about to start crying.

    I fell in love with this theme and things have been going great until I went to try and add a header image resize to the function.php and then everything fell apart.

    I tried copy and pasting the original function.php from the spun.zip file but nothing.

    Im so sad. :( I don't know what i did wrong and now that website is ruined. I'm hoping I can find a quick fix soon as i need to have this website done! :(

  2. kmpaperie
    Member
    Posted 1 year ago #

    I just deleted a re-installed everything. But now my header image is small. I need it to be like 400px x 600px.

  3. I tried copy and pasting the original function.php from the spun.zip file but nothing.

    Uh don't do that. Don't cry either. ;) A link to your site doesn't hurt either.

    First thing: if you haven't already done so create a child theme of Spun. Call that directory spun-child and put this simple style.css file there.

    /*
    Theme Name: Spun Child Theme
    Author: Self-Help WordPress User
    Template: spun
    */
    
    @import url("../spun/style.css");

    In your dashboard activate the Spun Child Theme. That will be the starting point for making any changes. That way if Spun gets updated then you will not lose your work.

    Now what changes to the original functions.php file where you trying to make and what header? Did I mention a link could help? ;)

  4. kmpaperie
    Member
    Posted 1 year ago #

    I reinstalled the spun.zip and have a new theme up.
    link - kmpaperie.com/custom

    the problem now is the header size.
    How can I make the logo header bigger?

    I have jetpack and have been using that for the other adjusments you'll see on the theme.

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    Hello kmpaperie, in your Child Theme style.css file, add this;

    #masthead img {
     max-height: auto;
    }
  6. kmpaperie
    Member
    Posted 1 year ago #

    I put it on my jetpack css and it gave me a ! in a triangle and didn't work.

    It's auto and not the actually pixel size?

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Auto is the equivalent actual pixel size. You can use the pixel size if you want.

    Is there anything else Jetpack is saying as a warning about it?
    Can you post a link to a screenshot of this?

  8. kmpaperie
    Member
    Posted 1 year ago #

    here you are - http://snag.gy/O71gO.jpg

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    Sorry, it's initial not auto. Try;

    #masthead img {
     max-height: initial;
    }
  10. kmpaperie
    Member
    Posted 1 year ago #

    no dice :( kmpaperie.com/custom

    it still has the ! triangle thing.

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    But it is working in the website, right?

  12. kmpaperie
    Member
    Posted 1 year ago #

    no :( it still cuts off the logo - kmpaperie.com/custom

  13. Andrew
    Forum Moderator
    Posted 1 year ago #

  14. kmpaperie
    Member
    Posted 1 year ago #

    sure sure. One second.
    and thank you for helping me with this. :)

  15. kmpaperie
    Member
    Posted 1 year ago #

    okay uploaded. Its still cropping at 150x150px

  16. Andrew
    Forum Moderator
    Posted 1 year ago #

  17. kmpaperie
    Member
    Posted 1 year ago #

    I tried that too and it really messed up my functions.php file. :(

  18. kmpaperie
    Member
    Posted 1 year ago #

    Here's the screen shot with the new code in the jetpack css style sheet.
    http://snag.gy/QJ5nd.jpg

  19. kmpaperie
    Member
    Posted 1 year ago #

    i tried changing it to 500px and it got rid of the ! triangle but still didnt remove the 150x150 logo limitations. :(::(

  20. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    The header will crop to 150px x 150px unless you add a filter to make it larger. Here's a step-by-step:

    1) Create a child theme -- Jan's instructions above are perfect! Don't forget to activate it under Appearance -> Themes (but don't delete the parent theme)
    2) Add a functions.php file to your child theme -- it should have only one line of code to start:

    <?php

    3) Add the code posted in this thread to your child theme's functions.php after that first line, changing the values to the new dimensions you need

    That, coupled with the CSS Andrew suggested above, will allow you to resize the header image to fit your design.

  21. kmpaperie
    Member
    Posted 1 year ago #

    how do I create a child theme? is my jetpack not a child theme?
    and I have a functions.php file already, do I make a new one?

  22. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    You'll find instructions for creating a child theme in the links above, and then you'll make a new functions.php file to go in your child theme.

    Jetpack only allows you to edit the theme's appearance -- it doesn't allow you to change the theme's functionality, like the custom header size.

  23. kmpaperie
    Member
    Posted 1 year ago #

    How do I create a directory?
    Where do I add the new functions too and whats the exact coding that goes

    Im so nervous i'll eff' it up again and have to reinstal a new spun so I want to be very very sure of the steps and directions.

  24. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    See this link http://codex.wordpress.org/Child_Themes and see Jan's post above. You'll need to have FTP access to your site - ask your hosting company about the access info for FTP.

    http://codex.wordpress.org/FTP_Clients

  25. kmpaperie
    Member
    Posted 1 year ago #

    Okay I have a cyberduck login now and am on the public_html folder.
    How do I make a new directory?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.