Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3267

    I would like to place a logo/image inside the top black bar (where the additional headline appears) along with the text that appears there that I type in. I tried to take the solution for the other theme and make it work on CleanCut but I just don’t know enough about WP to make it work.

    I saw some discussion elsewhere on how to change it so that you can place images within the ‘Additional Headline’ area, but the solution was for a different template, I think. Any help would be greatly appreciated! Thanks!

    #41427

    Hey,

    search for following code in page.php, single.php and template_fullwidth.php:

    if($headline!= '')
    {

    Replace it with:

    if($headline!= '')
    {
    $headline = html_entity_decode($headline);

    #41428

    That worked! Thank you! Just one more question – I would like to have the text that flows out to the right of the image be centered vertically in relation to the image.

    #41429

    Can you provide a link to a sample please?

    #41430

    Certainly!

    http://iosodesign.com/news/

    Right now, the text aligns at the top. Would like it to align center. Here’s what I keyed into the ‘Additional Headline’ area:

    <img class="alignleft size-full wp-image-116" style="margin-right: 30px; margin-bottom: 0px;" title="ioso design" src="/wp-content/uploads/2011/03/ioso_logo_block.png" alt="ioso design" width="150" height="150"/>The latest from ioso design

    #41431

    Hey,

    The output of the image within the h2 tag creates it’s own problems in aligning the text in the centre as technically the whole element is set up to do this already. As the image has the class alignleft added, it ignores the centre alignment as it has a float.

    There are 2 possible ways to do this, firstly by adjusting the PHP to accommodate the image and use conditional checks to display the content in the correct place dependant of whether there is an image or not.

    The second way to do this is purely by adjusting the CSS, this is the easier way to do this and less likely to cause problems (a PHP error usually results in a blank screen whereas a CSS error just makes the page display incorrectly but it still displays nonetheless).

    There are a couple of assumptions here, firstly that every page has the image present, secondly that is will always be aligned to the left (and therefore have the class alignleft and lastly that the image will always be 150px wide.

    Add this to the end of style.css:

    #wrapper_heading h2 {
    margin: 0 0 7px 150px !important;
    }

    #wrapper_heading h2, #wrapper_heading h2 a {
    text-align: center;
    }

    #wrapper_heading h2 img.alignleft {
    margin-left: -150px;
    }

    If you want to go down the PHP route this isn’t something I have time to do for you (this is a modification not a support request and is therefore beyond the scope of this forum) however you could hire someone to help you with this.

    Hope this helps.

    James

    #41432

    That centered the text horizontally. What I was looking to do is keep the text aligned left and centered vertically.

    Thank you very much for your help!

    #41433

    Hey,

    I don’t know an easy way to center the text vertically. The problem is that there’s no attribute “center vertically” and if we use margins + paddings we also move the image. Another problem is that your headlines are sometimes shorter (one line) and sometimes longer and we can’t center the text dynamically….

    #41434

    Cool. Thanks! After I did some research on CSS around the interwebs, I realized it wasn’t going to be an easy fix. Thank you so much for all the help though! I really love the theme and your support area here has been a very valuable resource!

    #41435

    Thanks for the kind words :)

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

The topic ‘Placing image in 'Additional Headline' area in CleanCut’ is closed to new replies.