Julie @Niackery

Member

Forum Replies Created

  • In reply to: Responsifying the Graphene header

    #43381

    Hmm, I still haven’t gotten anywhere with this. Since I’m using the plugin for all images and not just the header, I’m sure that the hardcoding solution via a child theme isn’t right. Could someone please take a look at the graphene header image code to see why pulling the header image source with picture::create() isn’t working? Thanks!

    In reply to: Responsifying the Graphene header

    #43380

    Thanks for clearing that up — it’s all starting to make sense.

    I’m using Responsify WP to make all images within the_content responsive (based on picturefill and the <picture> element). There’s the additional possibility of using picture::create() to make the header image responsive as well. Basically, we’re trying to make this work:

    <div id="header">
    <?php
    $header_id = graphene_get_attachment_id_from_src( $header_img );
    if ( ! is_front_page() && $graphene_settings['link_header_img'] ) {
    $header_img_tag = '<a href="' . apply_filters( 'graphene_header_link' , home_url() ) . '" title="' . esc_attr__( 'Go back to the front page', 'graphene' ) . '">';
    $header_img_tag .= Picture::create( 'element', $header_id );
    $header_img_tag .= '</a>';

    $header_img = $header_img_tag;
    }
    echo $header_img;
    ?>

    So I’m still not sure whether a child theme would be the way to go, but if it is, at least I’m half way there 😉 I hope you don’t mind coming back one more time to confirm whether that’s what I should do.

    Regarding a mobile theme, I’m really just trying to build a responsive website without a separate mobile theme. I feel like I’m almost there!

    Thanks for checking out my site and for your advice 🙂 I thought the default fonts were automatic! Oh, le sigh…

    In reply to: Responsifying the Graphene header

    #43378

    Thanks for getting back to me, Kenneth.

    Perhaps there’s something I’m not getting, but I don’t see how that will help. As the plugin author says, the problem is with Graphene’s treatment of the image source. Did you check out the link? Here’s the relevant part:

    Quote:
    I downloaded the Graphene theme and played around with it myself. The graphne_get_attachment_id_from_src() function doesn’t seem to work, it just returns null.

    RWP has an internal, similar function but that doesn’t work either.

    I don’t really know any good solution to this actually. The problem in this case is rather the way the theme is made than how RWP is working.

    However, by hard coding the ID of the selected header image I got it working perfectly. It’s just the hard coding stuff we don’t want…

    So I’m not sure that creating a new template would actually solve anything? Besides, the plugin author is just helping me figure out how to get the code working, he’s not writing any templates or files for me or anything, so I’m not quite sure what you mean by that?

    I’ve been trying to figure out what it means to hard code something because that seems to be the key to me understanding this issue. All I can really come up with at this stage is that hard coding simply means using something precise rather than a code, so in this case, I believe that would mean putting the header img url directly in the file. If I’m right about that, then wouldn’t creating a child theme with a modified header.php file still involve hard coding the img source?

    Sorry about my confusion! I appreciate your help 🙂

    (BTW, I already have a child theme, I just haven’t finished transferring the theme options/settings, nor have I had a real reason to use it, so it’s kind of just sitting there, inactive…)

Viewing 3 posts - 1 through 3 (of 3 total)

Graphene Themes Forum