Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #331

    Hi there,

    Just above the sorting boxes I want to add an additional headline, do I just need to edit the portfolio template to include the code for that?


    Hmm actually looks a bit more complicated…any help will be very much appreciated :)


    I would recommend to modify header.php:

    Modify this code:

    echo '<div class="center">';
    if($headline != "") echo $headline;


    echo '<div class="center">';
    if($headline != "") echo $headline;

    if ( get_post_meta($post->ID, 'second_headline', true) )
    {echo '<br/><h2>' . get_post_meta($post->ID, 'second_headline', true) . '</h2>' ;}

    Now you can add a custom post value to every page/post you publish. It can be used with the portfolio template but also on other pages.

    At the moment the value is called “second_headline”. You’ve to modify the code for your needs.

    The Dude


    Hmmm syntax error…


    It’s ok don’t panic, I edited the portfolio template itself…I only have one anyway…


    Exuse my mistake I forgot a “;” on the second line.

    I wrote:

    if($headline != "") echo $headline

    instead of

    if($headline != "") echo $headline;

    But glad that you solved the problem yourself – ypu’re becoming a WordPress Pro ;-) .

    The Dude

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

The topic ‘Additional Headline strip on Portfolio page’ is closed to new replies.