5 replies [Last post]
Kevstar
Kevstar's picture
Offline
Enthusiast
England
Last seen: 4 years 12 weeks ago
England
Timezone: GMT+1
Joined: 2012-07-20
Posts: 81
Points: 107

Hi All.

I have chosen to start using wordpress for my PC site. (www.xclo.co.uk/dir/). I have also chosen to add the premiumpress theme called couponpress. It is a rather good theme and I do like it but I am not so keen on the default layout.

I am wanting to add the logo to the header with the search bar next to it with the login details in the top corner.

I have created a child theme with a file called _functions.php (the _ is required for all premiumpress child themes).

In this I tried adding the code:

<?php
 
function search_to_header($content){
 
global $wpdb,$PPT;
 
echo '<div class="w_960">
 
<div class="f_half left" id="logo">
 
<img src="'.$PPT->Logo(true).'" alt="'.get_bloginfo('name').'" />
 
</div>
 
<div class="right " id="header-search">';
 
echo '<form method="get" action="'.$GLOBALS['bloginfo_url'].'/" name="searchBox" id="searchBox">
<input type="text" value="'.$PPT->_e(array('head','2')).'" name="s" id="s" onfocus="this.value=\'\';" />';
 
if(isset($GLOBALS['ppt_layout_styles']['submenubar']) && isset($GLOBALS['ppt_layout_styles']['submenubar']['hidecat']) && $GLOBALS['ppt_layout_styles']['submenubar']['hidecat'] == 1){ }else{
// BUILD CATEGORY DROP DOWN LIST
$catdata = premiumpress_categorylist(0,'toponly');
if(strlen($catdata) > 1){
$string .= '<select id="catsearch" name="cat"><option value=""> </option>'.$catdata.'</select>';
}
}
 
echo '<div class="searchBtn left" onclick="document.searchBox.submit();">  </div>';
 
if(get_option("display_advanced_search") ==1){
echo '<small>'.$PPT->_e(array('head','3')).'</small>';
}
echo '</form>';
 
echo '</div>
 
</div> <!-- end header w_960 -->';
}
 
function _blank_content(){
 
}
 
function remove_old_search(){
global $wpdb,$PPT, $userdata; get_currentuserinfo(); $string='';
 
echo '<div class="w_960">';
 
if(isset($GLOBALS['ppt_layout_styles']['submenubar']) && isset($GLOBALS['ppt_layout_styles']['submenubar']['search']) && $GLOBALS['ppt_layout_styles']['submenubar']['search'] == 1){
 
echo '<div id="hpages">
 
    '.premiumpress_pagelist().'
 
</div>';
 
}
 
echo '<ul class="submenu_account">';
 
if ( $userdata->ID ){
 
echo '
'.$PPT->_e(array('head','4')).'
'.$PPT->_e(array('head','5')).'
<b>'.$userdata->user_login.'</b>
 
';
 
}else{
 
echo '
'. $PPT->_e(array('head','6')).' |
'.$PPT->_e(array('head','7')).'
 
';
 
}
 
echo ' ';
 
echo '</div> <!-- end w_960 -->';
 
}
 
add_action('premiumpress_header_inside','search_to_header');
add_action('premiumpress_submenu_inside','_blank_content', 10);
add_action('premiumpress_submenu_inside','remove_old_search', 20);
 
?>

but this adds the logo and the search with the but the menu bar underneath it. (screenshot below)

I have also tried:

<?php
 
function custom_search_widget() { ?>
 
<div class="widget widget_search">
 
<form method="get" class="search_form" action="<?php bloginfo('home'); ?>/">
<p>
<input class="text_input" type="text" value="<?php echo $field_value; ?>" name="s" id="s" onfocus="if (this.value == '<?php echo $field_value; ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo $field_value; ?>';}" />
<input type="submit" id="searchsubmit" value="Search" />
</p>
</form>
</div>
<?php }
 
add_action('premiumpress_header_inside' , 'custom_search_widget');
 
function removelinkme( ){
 
global $wpdb,$PPT;
 
return '<div class="w_960">
 
<div class="f_half left" id="logo">
 
<img src="'.$PPT->Logo(true).'" alt="'.get_bloginfo('name').'" />
 
</div>
 
<div class="left padding5" id="banner">
 
'.premiumpress_banner("top",true).'
 
</div>
 
</div> <!-- end header w_960 -->';
}
add_action('premiumpress_header_inside','removelinkme');
 
?>

But this just adds the search bar to the top with the logo underneath on top of the menu. screenshot also below.

please can someone help me fix this. thanks.

AttachmentSize
Richard Bonk.jpg63.46 KB
code.jpg60.93 KB
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 44 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

You're asking a question that

You're asking a question that is better served being addressed to the theme authors please. Custom themes, premium themes should/ought to generally offer support and they are the ones that know how their theme is constructed and may be modified.

Checking this themes site clearly states 'Free Support'.

Most of what you have shown above does not really relate at all to CSS or general frontend coding really and is also scripting/php functions most people on this forum are not WP developers so most of that abstracted API code will be meaningless.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Kevstar
Kevstar's picture
Offline
Enthusiast
England
Last seen: 4 years 12 weeks ago
England
Timezone: GMT+1
Joined: 2012-07-20
Posts: 81
Points: 107

hi Hugo. 1. My question is

hi Hugo.

1. My question is already on the premiumpress forum to which I have had no reply. Which is why I am asking you.
2. "Checking this themes site clearly states 'Free Support'." The email 'support' does not support the creation / editing of child themes. I have already tried this. which is also why I am asking you.

DO you know of any forums that will gladly help me? because I can not turn to premiumpress.

thank you.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 44 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A premium theme and authors

A premium theme and authors should support their theme regardless of type of support request.
I can't offer a suggestion for a forum as the same issue applies you need someone who understands the proprietary nature of this theme and how it works, part of that is unique to the theme and would need to be 'learnt'.

This sounds like a case where you need to hire a developer if the adjustments are beyond your coding skills.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Kevstar
Kevstar's picture
Offline
Enthusiast
England
Last seen: 4 years 12 weeks ago
England
Timezone: GMT+1
Joined: 2012-07-20
Posts: 81
Points: 107

"This sounds like a case

"This sounds like a case where you need to hire a developer if the adjustments are beyond your coding skills."

this is a common answer.

I am trying to learn as I want to create other peoples websites using this theme. So how can I do that if I hire a developer?

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 49 weeks 5 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Kevstar wrote: I am trying to

Kevstar wrote:

I am trying to learn as I want to create other peoples websites using this theme. So how can I do that if I hire a developer?

Dare I suggest that you should try another theme? Obviously the one you picked isn't working for you. I'm afraid there are no easy shortcuts to developing good websites. You have to dig in and learn how it works.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.