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

    Hi !

    I want to add an additional headline to my front page that is my side page. Is this possible ?

    I’ve seen the related topics about additional headline in http://www.kriesi.at/support/topic/adding-additional-headline-to-front-page-clarification and http://www.kriesi.at/support/topic/how-do-you-add-the-additional-headline-to-the-front-page but it did not work.

    To try to figure it out, I went to header.php ,

    at the end of this :

    #breadcrumb navigation

    if(!is_front_page()){

    if($k_option == ”)

    {

    $headline = get_post_meta($post->ID, “_headline”, true);

    if($headline != “”) $headline = ‘<h2>’.$headline.’</h2>’;

    }

    else

    {

    $headline = $k_option;

    }

    echo ‘<div class=”wrapper wrapper_heading ie6fix” id=”wrapper_featured_area”>’;

    echo ‘<div class=”overlay_top ie6fix”></div>’;

    echo ‘<div class=”overlay_bottom ie6fix”>’;

    echo ‘</div>’;

    echo ‘<div class=”center”>’;

    if($headline != “”) echo $headline;

    echo ‘</div></div>’;

    echo ‘<div class=”wrapper” id=”wrapper_stripe”>’;

    if(class_exists(‘kclass_breadcrumb’)){ $bc = new kclass_breadcrumb; }

    echo ‘</div>’;

    }

    i added this :

    if(is_front_page()){

    if($k_option == ”)

    {

    $headline = get_post_meta($post->ID, “_headline”, true);

    if($headline != “”) $headline = ‘<h2>.$headline.</h2>’;

    }

    else

    {

    $headline = $k_option;

    }

    echo ‘<div class=”wrapper wrapper_heading ie6fix” id=”wrapper_featured_area”>’;

    echo ‘<div class=”overlay_top ie6fix”></div>’;

    echo ‘<div class=”overlay_bottom ie6fix”>’;

    echo ‘</div>’;

    echo ‘<div class=”center”>’;

    if($headline != “”) echo $headline;

    echo ‘</div></div>’;

    echo ‘<div class=”wrapper” id=”wrapper_stripe”>’;

    if(class_exists(‘kclass_breadcrumb’)){ $bc = new kclass_breadcrumb; }

    echo ‘</div>’;

    }

    Now i have the place to add my headline, I mean i have my headline but without any content inside. The thing is I have absolutely no idea where I can write my title (for ex : <h2> I love Avisio</h2>) could you please tell me how to write this inside my empty new additional headline ?

    thanks a lot for answering and helping !

    This forum is really efficient !

    #91379

    Hi,

    Go to Edit page and edit your homepage. On top right corner there is Screen Options and Help Tab. Look under Screen Options, and please make sure that the check mark next to ‘Custom Fields’ is checked.

    Then when you look lower on the page you should see an additional metabox with two input boxes. In the first one you would put the name of the variable which is _headline by looks of the code you pasted. And in the second box you would enter whatever you want your second headline to say.

    When you are finished, click Add Custom Field, and save the page. Return to make sure the value is saved and then if you say your code is complete, everything should show up.

    More info can be found here http://codex.wordpress.org/Function_Reference/get_post_meta … and also this http://www.red-sweater.com/forums/discussion/1921/custom-fields-not-saved-by-wordpress/p1 if you have problems saving.

    Thanks,

    Nick

    #91380

    Hi Nick !

    Thanks for answering. THe thing is that my home page is the side page and there is no Edit page for that. So I can not “go to edit and edit my homepage”. THat is why I have this problem….

    How can I do ?

    (to add additional headline to front page that is the slide page)

    I really appreciate your help to help to solve the problem !

    Emile

    #91381

    Hi,

    Please open /theme_options/ directory off the root of the site and find a file called mainpage.php. Please make a backup of the file in case of a problem, so you will be able to quickly revert:

    Please delete the contents of the file and replace them with the code here http://pastebin.com/c9WtAQmM

    Now you should see in the backend Avisio Options > Mainpage options, another field for the headline.

    And to display it. you can put it ***before*** this line in the index.php page (though u can just put the block and then add the css to move it anywhere, or paste it anywhere)

    <div class="wrapper fullwidth" id='wrapper_main'>

    I just made up some css classes, you can style it with whichever ones you want. I didn’t use the block of code you pasted but you can do whatever works for you: This is the block you should be pasting:

    <?php
    if ( is_front_page() && $k_option[ 'mainpage' ][ 'second_headline_text' ] )
    {
    echo '<div class="wrapper" id="second_head_wrapper">';
    echo '<div class="second_headline_text center">';
    echo $k_option[ 'mainpage' ][ 'second_headline_text' ];
    echo '</div></div>';
    } //is_front_page() && $k_option[ 'mainpage' ][ 'second_headline_text' ]
    ?>

    just be aware that this line produces the text that you want displayed, all else is just styling (besides the if{} block

    echo $k_option[ 'mainpage' ][ 'second_headline_text' ];

    Good luck,

    Nick

    #91382

    HI ! Thank you Nick ! It works perfectly !

    I really appreciated your help !

    Have a good week,

    Emile

    #91383

    Hi,

    Anytime. Thanks.

    Good luck,

    Nick

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

The topic ‘Adding additional headline to front page with side page’ is closed to new replies.