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.
Create Another Headline Button (Text)
10 posts from 3 voices-
Posted 2 years ago #
-
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.
Posted 2 years ago # -
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
Posted 2 years ago # -
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 :)
Posted 2 years ago # -
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
Posted 2 years ago # -
Guys,
I wonder whether you have had time to look at my last response as I could do with some help here.
Posted 2 years ago # -
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?
Posted 2 years ago # -
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
Posted 2 years ago # -
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
Posted 2 years ago # -
no, it seems to not work for me either
Posted 2 years ago #
Reply
You must log in to post.














