Results 1 to 5 of 5

Thread: A Few Things with Twenty Eleven

  1. #1
    jmixmaster's Avatar
    jmixmaster is offline Hello World
    Join Date
    Jul 2011
    Location
    Delaware, USA
    Posts
    2

    Default A Few Things with Twenty Eleven

    I have a few things that I need help with in Twenty Eleven.

    1. The logo I put in the header is resized to 578px by 160px, when it is supposed to be 326px by 90px.

    2. I would like to simply the php code that controls this:


    I added the gradient to the info box and also the about the author text and bio line. I'm not very knowledgeable with PHP so I don't want to mess with it without help.

    PHP Code:
    <?php
                
    /* translators: used between list items, there is a space after the comma */
                
    $categories_list get_the_category_list__', ''twentyeleven' ) );

                
                
    /* translators: used between list items, there is a space after the comma */
                
    $tag_list get_the_tag_list''__', ''twentyeleven' ) );
                if ( 
    '' != $tag_list ) {
                    
    $utility_text __'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>.''twentyeleven' );
                } elseif ( 
    '' != $categories_list ) {
                    
    $utility_text __'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.''twentyeleven' );
                } else {
                    
    $utility_text __'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.''twentyeleven' );
                }
                

                
    printf(
                    
    $utility_text,
                    
    $categories_list,
                    
    $tag_list,
                    
    esc_urlget_permalink() ),
                    
    the_title_attribute'echo=0' ),
                    
    get_the_author(),
                    
    esc_urlget_author_posts_urlget_the_author_meta'ID' ) ) )
                );
            
    ?>
    3. I want to know how I could add a featured image for each post to the front page because it doesn't seem like it has one coded in.

    Here is a live link: http://gscdesigns.co.cc/
    Thanks.
    Last edited by jmixmaster; 07-20-2011 at 06:15 PM.

  2. #2
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    For your first question, I did some digging and it looks like any custom image is going to be re sized to 1,000 by 288 which is stupid, not sure why it does that but it have more control over this, I found this text within the TwentyEleven Functions.php file:

    Code:
    // The height and width of your custom header.
    	// Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values.
    	define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1000 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 288 ) );
    I'd dig around that area of the functions.php file for more information, I'm still not clear as to how to add a filter to have more control over the customer header image file size.

    What exactly do you want to control regarding that text? If you were wanting to change the actual text, looks like you're in the right area as it fits a couple of the Utility Text areas.

  3. #3
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    865

    Default

    How to add a filter for that:

    PHP Code:
    add_filter('twentyeleven_header_image_width','custom_width');
    function 
    custom_width($width) {
      return 
    600// or whatever

    Same for height. These would go in a child theme's functions.php, of course.

  4. #4
    jmixmaster's Avatar
    jmixmaster is offline Hello World
    Join Date
    Jul 2011
    Location
    Delaware, USA
    Posts
    2

    Default

    Thanks for the help thus far. But its not the actual header I'm having a problem with. It's the logo.

    This is the exact size its supposed to be. (click the image for full size)

    logo-link.jpg

    When I right click on the image and select "View Image Info" (in FF4) this is what I get:


    Its the same link to the picture, but see how it says the image is being resized? That's what I am having a problem with. I've looked in the CSS and there's nothing in there about resizing an image.



    As for the text in that block, I would just like to not have all that php in there. I don't really know anything about php and want to use wordpress' shortcodes for the utility text things rather than that whole big block of php.

    EDIT: I just noticed that there are two parentheses after the wordpress in the image link. Not sure whats going on with that.

  5. #5
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    595

    Default

    Need to add
    #site-title a img {
    height: 90px;
    width: 326px;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •