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

    I want to put another headline button on my home page called “contact us”see www,psweb-test.com. I would like to create it in the same format as our products linking to the contact page. I am very new to wordpress and php can anyone help or point me in the right direction.

    #32713

    If this is a static link, I’d add it to header.php. Open it up and find this code:

    #breadcrumb navigation
    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>';
    }

    Change it to:

    #breadcrumb navigation
    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 '<a href="MY-LINK-URL">MY LINK TEXT</a>';

    echo '</div></div>';
    echo '<div class="wrapper" id="wrapper_stripe">';
    if(class_exists('kclass_breadcrumb')){ $bc = new kclass_breadcrumb; }
    echo '</div>';
    }

    Change MY-LINK-URL and MY LINK TEXT to your contact us page link and text.

    #32714

    James,

    I have tried this but does not seem to work at all. If you goto site http://www.psweb-test.com. Next to the Text ‘Why Kibworth Fencing?” I want to put a button with similar format to “Our Product Range” that says ” Contact Us”.

    I have tried your fix and out in the header php but nothing happens.

    Please can you help

    #32715

    Sorry, I got the wrong end of the stick – the code I provided is for sub pages not the homepage (really shouldn’t skim read things…) – have a look here to see it working (albeit it needs styling): http://www.psweb-test.com/?page_id=44

    If this is just for the homepage, bear in mind that this will mean fewer slider entries can be displayed at once because the thumbnails will run out of space.

    Open up index.php and find this code:

    <?php

    $slideshow->setSlideshowSize('S');
    $slideshow->showThumbnails();

    if($k_option['mainpage']['buttonText'])
    {
    echo '<a href="'.get_permalink($k_option['mainpage']['buttonLink']).'" class="big_button heading ie6fix">';
    echo '<strong class="ie6fix">'.$k_option['mainpage']['buttonText'].'</strong><span class="buttonBg dynamicBg"></span></a>';
    }

    ?>

    Change it to:

    <?php

    $slideshow->setSlideshowSize('S');
    $slideshow->showThumbnails();

    echo '<a href="http://MYLINKHERE.COM" class="big_button heading ie6fix">';
    echo '<strong class="ie6fix">MY TEXT HERE</strong><span class="buttonBg dynamicBg"></span></a>';

    if($k_option['mainpage']['buttonText'])
    {
    echo '<a href="'.get_permalink($k_option['mainpage']['buttonLink']).'" class="big_button heading ie6fix">';
    echo '<strong class="ie6fix">'.$k_option['mainpage']['buttonText'].'</strong><span class="buttonBg dynamicBg"></span></a>';
    }

    ?>

    Update the MYLINKHERE.COM and MY LINK TEXT to the link and text you’d like to display. You also need to undo the previous code I posted (sorry :)

    #32716

    James,

    I have tried this and it again does not seem to work. I dont want to put this buttton Next to the “Product Range” button in http://www.pswesb-test.com index page but after the heading text “Why Kibworth Fencing?” as mentioned in my lasts reply. So I am not sure whether this needs to be on the homepage or the page that was defined for this section. Also when I click on your http://www.psweb-test.com/?page_id=44 link all I see is the contact page, am I missing something?

    Sorry I am a bit confused but appreciate your help

    #32717

    Guys,

    I wonder whether you have had time to look at my last response as I could do with some help here.

    #32718

    Sorry, there’s been a bit of a backlog with support requests, there’s only so much I can do…

    The code was untested, it works but the CSS needs a modification to get it working.

    Where do you want the button to appear? Next to or below the existing button? If next to, are you removing some of the slides?

    #32719

    James,

    Please read my posts !!!

    I dont want to put this buttton Next to the “Product Range” button in http://www.pswesb-test.com index page but after the heading text “Why Kibworth Fencing?” as mentioned in my lasts reply. So I am not sure whether this needs to be on the homepage or the page that was defined for this section.

    So I am asking whether it is right that the code is put in the index,php as I want the button to show next to the heading Why “Kibworth Fencing” which is defined on another page?

    .

    Can you please help

    #32720

    The “Why Kibworth Fencing” text is the title of the page set to show on the front page. If you want to add the button here, you’d need to add it to the page and not to index.php

    #32721

    no, it seems to not work for me either

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

The topic ‘Create Another Headline Button (Text)’ is closed to new replies.