WordPress.org

Ready to get started?Download WordPress

Forums

Magomra
[resolved] Custom header image (11 posts)

  1. MortimerCat
    Member
    Posted 1 year ago #

    I uploaded a custom header image. I can see it on the custom header preview.

    The custom header image does not appear on my actual website. I just get the standard dark grey Magomra header.

    Is this simply because Magomra does not support custom headers?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Is this simply because Magomra does not support custom headers?

    Possibly, it seems the demo website of that theme does not have a custom header image.

  3. Luke Mlsna
    Member
    Theme Author

    Posted 1 year ago #

    It should support custom headers, I'll take a look at the code and see if there's a problem. You are using the latest version, correct?

  4. Luke Mlsna
    Member
    Theme Author

    Posted 1 year ago #

    It's working for me... http://test.shinraholdings.com/

  5. MortimerCat
    Member
    Posted 1 year ago #

    I was using Version 1.3.8

    The only thing unusual in my setup is that it is a multisite version. Otherwise it is just a basic, fresh installation.

    Unfortunately, I settled with another theme, losing the ability to investigate further.

  6. Luke Mlsna
    Member
    Theme Author

    Posted 1 year ago #

    I got another complaint about this so I double checked the code. The problem is most likely with how your sever is configured, specifically that it won't allow URL variables to be passed through the <link> tag to the dynamic stylesheet (style.php). Below is what was wrong with the second case I investigated:

    I've isolated the problem. I'm not exactly sure what's causing it, but it has something to do with how you're server is set up.

    If you look in the source of your index page, you'll see this line in the <head> section:

    <link rel='stylesheet' id='magomra_style_dynamic-css' href='http://your-utl.com/school-of-business/wp-content/themes/magomra/style.php?css=a%3A9%3A%7Bs%3A1%3A%22c%22%3Bs%3A3%3A%22762%22%3Bs%3A1%3A%22s%22%3Bs%3A3%3A%22252%22%3Bs%3A1%3A%22l%22%3Bs%3A1%3A%22r%22%3Bs%3A1%3A%22h%22%3Bs%3A69%3A%22http%3A%2F%2Fnerdenterprises.com%2Fschool-of-business%2Ffiles%2F2012%2F12%2FBooks.jpg%22%3Bs%3A1%3A%22b%22%3Bs%3A3%3A%22ddd%22%3Bs%3A1%3A%22t%22%3Bs%3A3%3A%22fff%22%3Bs%3A1%3A%22w%22%3Bi%3A1044%3Bs%3A1%3A%22e%22%3Bi%3A140%3Bs%3A1%3A%22a%22%3Bi%3A0%3B%7D&ver=3.5' type='text/css' media='all' />

    This is the link to the dymanic stylesheet, style.php. This is a PHP file that sends a CSS file header and outputs some CSS styles dynamically with PHP using the $_GET variables passed to it.

    The long urlencoded string after ?css= is a serialized array that includes your chosen header text color and header image. So these values are being correctly passed to the style.php file, HOWEVER, if you inspect the source of style.php, it looks like none of the $_GET variables are being passed into the file. The variables are listed in the comment at the top of the file for debugging purposes, and yours is totally blank.

    To confirm this is the problem you're having, view the source of your index page, find the <link> to the style.php file and copy the entire url and paste it into your browser (or just click the link if you're using firefox). The comment at the top will list all of the passed $_GET variables, which should match to the unencoded, unserialized value of the ?css= string.

  7. Luke Mlsna
    Member
    Theme Author

    Posted 1 year ago #

    I'm (probably) going to eliminate dynamic style sheets in the next version (1.3.9), so if you're willing to wait a bit, the problem will fix itself.

  8. MortimerCat
    Member
    Posted 1 year ago #

    I get the same result with no variables appearing. So far I have concluded that the urlencoded string is not at fault.

    Now I have a script to test, I can dig a little deeper. I will let you know what I find.

  9. MortimerCat
    Member
    Posted 1 year ago #

    The reason is that my host has disabled the unserialize command.

    As per the PHP manual...

    Do not pass untrusted user input to unserialize(). Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this. Use a safe, standard data interchange format such as JSON (via json_decode() and json_encode()) if you need to pass serialized data to the user.

    The answer is to either recode avoiding serialize or your users need to avoid paranoid hosts who disable commands!

  10. yun123
    Member
    Posted 1 year ago #

    Hi,
    Im inexperienced.
    I like Magomra theme. Thank you author for this work.
    However i came to similiar problem - moving pimary menu in relation to header according to my needs.
    Right now, i am happy with this solution:
    - in wordpress editor, I have apperance / editor section . After going there, there is a list of files that i can edit on the right side. I took "style.php" and there was this entry: #top-navigation-primary {top: <?php echo ( $logged_in ? 140 : 119 ); ?>px; ... and exactly this 119 was my problem for about 2 hours, so now i put chosen value (my need - 50) and it works ... I could find the source of this 119 value in style.css or in other files. (and as for header i need just background-color: ... not image, (however this may change soon)

    With regards,

    :)

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @yun123 - please start you own thread - posting in an old thread that is already marked resolved is not a good way to get help here.

    Posting from the link below will get your post tagged with the theme name:

    http://wordpress.org/support/theme/magomra

    Also, please see this re: posting code on these forums:

    http://codex.wordpress.org/Forum_Welcome#Posting_Code

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic