Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #659

    Hey,

    I found the thread about adding the additional headline to the front page if it shall not be the slider pag: http://www.kriesi.at/support/topic/how-do-you-add-the-additional-headline-to-the-front-page

    I’ve discoverd that some of the code now already is included in the header.php:

    if(is_front_page()){
    $headline = get_post_meta($post->ID, "_headline", true);
    if($headline != "") $headline = '<h2>'.$headline.'</h2>';
    }

    Therefore I only have to add

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

    “where you’d like the Headline to display in index.php” – as it is written. But I simply don’t know where to put it exactly. I tried a lot of positions but the headline never appeared on the front page (which is my blog page). Could you please help me? :) Thank you in advance!

    #32351

    The headline code in header.php is:

    if(!is_front_page()){

    if($k_option['custom']['headlineContent'] == '')
    {
    $headline = get_post_meta($post->ID, "_headline", true);
    if($headline != "") $headline = '<h2>'.$headline.'</h2>';
    }
    else
    {
    $headline = $k_option['custom']['headlineContent'];
    }
    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>';
    }

    The first line says:

    if(!is_front_page()){

    which means if NOT front page execute the code within the { } tags.

    So, you either need to add this code:

    if(is_front_page()){
    $headline = get_post_meta($post->ID, "_headline", true);
    if($headline != "") $headline = '<h2>'.$headline.'</h2>';
    }

    or remove:

    if(!is_front_page()){ and the closing }

    along with the addition of this code in index.php:

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

    The front page slider uses the same area as the headlines on other pages, so where would you like the headline to appear?

    #32352

    I just took the deletion way and now the blue bar with the headline appeared in the right place at the front page. :)

    Thanks a million for the quick response!

    #32353

    Good morning,

    unfortunately two minor problems remained as I realized some days ago:

    First the small menu below the bar doesn’t work properly. It should read “Offene Religionspolitik (arrow) Blog” on the main page but it reads “Offene ReligionspolitikBlog”.

    Second the link at the bottom of the site just above the footer doesn’t work. It’s the automatically generated link to the second site of the blog (2). Clicking it leads to the main page, not the second page.

    Is there a possibility to overhaul these problems? Greetings und thanks!

    #32354

    Hey folks,

    I suppose that my last questions got somewhat lost. Therefore I push the thread up again. ;)

    “First the small menu below the bar doesn’t work properly. It should read “Offene Religionspolitik (arrow) Blog” on the main page but it reads “Offene ReligionspolitikBlog”.

    Second the link at the bottom of the site just above the footer doesn’t work. It’s the automatically generated link to the second site of the blog (2). Clicking it leads to the main page, not the second page.

    Is there a possibility to overhaul these problems? Greetings und thanks!”

    You can have a look at the problems at http://www.offene-religionspolitik.de

    #32355

    This problem seems to be a bug in the breadcrumb code because you’ve set the front page as the blog page (in the front page template the breadcrumbs aren’t shown).

    I’ll mark this for Kriesi’s attention :)

    #32356

    Hi!

    I will check that on a test installation and see if i can reproduce and eventually fix those bugs ;)

    Regards,

    Kriesi

    #32357

    I have an idea to solve the problem but I don’t know how to implement it. Normally in wordpress the option “Einstellungen – Lesen – Startseite – Deine letzten Artikel” lets the system show the blog entries on the frontpage, doesn’t it? In Avisio this option shows the slider. Is there a way to prevent this from happening?

    #32358

    Hey,

    I don’t speak German but the Google translation is “Options – Read – Home – Your last article”, if this is WP admin -> Options -> Reading then the option “Your Latest Posts” would use the home.php file (followed by index.php if home.php doesn’t exist). This is a little misleading because whilst WP was traditionally a blogging platform, with recent updates it has become so much more and doesn’t necessarily show blog posts on the homepage.

    The front page shouldn’t show breadcrumbs (and the function was never intended to do this) so the breadcrumb functions’ code may need updating to accommodate this.

    James

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

The topic ‘Adding additional headline to front page | clarification’ is closed to new replies.