• Hi

    I have got a couple of sites running wordpress, I can only use 1 template which is supplied by the company that supply the service I use.

    I am having problems running certain plugins, when I activate wBounce the wordpress admin bar disappears, wBounce appears to run correctly. Add Meta tags and To Top won’t work at all. I have tried a lot of plugins to numerous to mention. I have contacted the template authors and they tell me there is nothing wrong with the php coding, but they do admit that there is a problem somewhere but they can’t find it.

    This is the error report when I turned on debugging from a fresh install I put online just to test it

    Notice: Undefined index: post_id in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 3 Notice: Undefined index: icid in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 4 Notice: Undefined index: s in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 7 Notice: Trying to get property of non-object in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 11 Notice: Undefined variable: logoSize in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 81 Notice: Undefined variable: shadow in /var/www/vhosts/thechineseconnection.co.uk/httpdocs/wp-content/themes/icodes/header.php on line 83

    When I showed them the error this was the response

    “We looked at the coding and could not find anything obviously wrong, the line numbers shown in the errors above have no resemblance to what the line in the coding actually does.”

    This is the coding in header.php

    <?php
    include 'config.php';
    $code_id=$_REQUEST['post_id'];
    $icid=$_REQUEST['icid'];
    $px="18";
    $apx="10";
    $s = $_REQUEST['s'];
    $search =  get_search_query('search');
    $slug = get_query_var('category_name');
    $term = get_term_by( 'slug', $slug, 'category');
    $catname=$term->name;
    
    ?>
    
    <html>
    <head>
    
    <script>
    function open_site(url) {
    window.open(url, '_blank');
    }
    </script>
    
    <script type="text/javascript" language="JavaScript">
    function HideContent(d) {
    document.getElementById(d).style.display = "none";
    }
    function ShowContent(d) {
    document.getElementById(d).style.display = "inline";
    }
    function ReverseDisplay(d) {
    if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "inline"; }
    else { document.getElementById(d).style.display = "none"; }
    }
    </script>
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <?php
    $body_color=get_background_color();
    $background_image=get_background_image();
    $header_image=get_theme_mod('header-upload');
    $header_background_color=get_theme_mod('header-background-color');
    $mainmenu_background_color=get_theme_mod('mainmenu-background-color');
    $mainmenu_text_color=get_theme_mod('mainmenu-text-color');
    $mainmenu_highlight_color=get_theme_mod('mainmenu-highlight-color');
    $submenubar_text_color=get_theme_mod('submenubar-text-color');
    $submenubar_color=get_theme_mod('submenubar-color');
    $logo=get_theme_mod('img-upload');
    $logo_placement=get_theme_mod('logo_placement');
    $page_color=get_theme_mod('page-color');
    $footer_background_color=get_theme_mod('footer-background-color');
    $footer_text_color=get_theme_mod('footer-text-color');
    
    $sidebar_text_color=get_theme_mod('sidebar-text-color');
    $header_text_color=get_theme_mod('header-text-color');
    $shadow_color=get_theme_mod('shadow-color');
    $content_box_color=get_theme_mod('content-box-color');
    $content_box_text_color=get_theme_mod('content-box-text-color');
    $content_box_highlight_color=get_theme_mod('content-box-highlight-color');
    $sidebar_heading_text_color=get_theme_mod('sidebar-heading-text-color');
    $sidebar_heading_color=get_theme_mod('sidebar-heading-color');
    
    $content_heading_text_color=get_theme_mod('content-heading-text-color');
    $content_heading_color=get_theme_mod('content-heading-color');
    $search_box_color=get_theme_mod('search-box-color');
    
    $content_text_color=get_theme_mod('content-text-color');
    $sidebar_page_color=get_theme_mod('sidebar-page-color');
    
    $site_description = get_bloginfo( 'description' );
    $site_name = get_bloginfo( 'name' );
    
    $logoSize = get_option('icsmpl_logoSize', $logoSize);
    
    $shadow = get_option('icsmpl_shadow', $shadow);
    
    $margin=$logoSize+16;
    
    if($header_background_color==""){$header_background_color="#347baf";}
    if($mainmenu_background_color==""){$mainmenu_background_color="#2a628c";}
    if($mainmenu_text_color==""){$mainmenu_text_color="#ffffff";}
    if($mainmenu_highlight_color==""){$mainmenu_highlight_color="#347baf";}
    if($submenubar_text_color==""){$submenubar_text_color="#ffffff";}
    if($submenubar_color==""){$submenubar_color="#2a628c";}
    if($page_color==""){$page_color="#f7f7f7";}
    if($footer_background_color==""){$footer_background_color="#262626";}
    if($footer_text_color==""){$footer_text_color="#ffffff";}
    if($body_color==""){$body_color="#ffffff";}
    if($sidebar_text_color==""){$sidebar_text_color="#000000";}
    if($header_text_color==""){$header_text_color="#ffffff";}
    if($shadow_color==""){$shadow_color="#808080";}
    if($logo_placement==""){$logo_placement="left";}
    if($background_image){$body_color="";}
    if($header_image){$header_background_color="";}
    
    if($sidebar_heading_text_color==""){$sidebar_heading_text_color="#000000";}
    if($sidebar_heading_color==""){$sidebar_heading_color="#e5e5e5";}
    
    if($content_heading_text_color==""){$content_heading_text_color="#000000";}
    if($content_heading_color==""){$content_heading_color="#e5e5e5";}
    
    if($content_text_color==""){$content_text_color="#000000";}
    if($sidebar_page_color==""){$sidebar_page_color="#f7f7f7";}
    
    if($content_box_highlight_color==""){$content_box_highlight_color="#d1d1d1";}
    if($content_box_color==""){$content_box_color="#e5e5e5";}
    if($content_box_text_color==""){$content_box_text_color="#000000";}
    if($search_box_color==""){$search_box_color="#e5e5e5";}
    
    if($shadow=="off"){$shadow_color="off";}
    
    if($code_id or $icid){
    
    $region = get_option('icsmpl_region', $region);
    $username = get_option('icsmpl_username', $username);
    $subid = get_option('icsmpl_subid', $subid);
    
    if($region==""){$region="United Kingdom";}
    if($region=="United Kingdom"){$reg_url="icodes.co.uk/ws_plugin";}
    if($region=="United States"){$reg_url="icodes-us.com/ws_plugin";}
    if($region=="India"){$reg_url="icodes-in.com/ws_plugin";}
    
    $ch = curl_init();
    $timeout = 0; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, "http://webservices.$reg_url.php?UserName=$username&SubscriptionID=$subid&RequestType=Codes&Action=Icid&Query=$code_id,$icid&Sort=id&Page=$page&PageSize=$HomePageSize&Relationship=$relationship");
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $xml_raw  = curl_exec($ch);
    $xml = simplexml_load_string($xml_raw);
    curl_close($ch);
    $total_items=trim($xml->Results);
    foreach ($xml->item as $item) {
    
        $title = $item->title;
        $merchant = $item->merchant;
        }
    }
    
    ?>
    
    <title>
    
    <?php
    
    if($code_id or $icid){
    
    bloginfo('name'); echo " - "; echo urldecode(str_replace("-"," ",$title));
    }
    
    elseif($search>"") {
    
    bloginfo('name'); echo " - ";  echo wp_specialchars($search); echo" Codes and Offers";
    
    }
    
    elseif($catname>"") {
    
    bloginfo('name'); echo " - ";  echo "$catname";
    
    }
    
    elseif(is_page()){
    
    bloginfo('name'); echo " - "; the_title();}
    
    elseif(is_single()){
    
    the_title(); echo " - "; bloginfo('name'); }
    
    else{
    bloginfo('name');
    }
    
    /*
    * Print the <title> tag based on what is being viewed.
    */
    global $page, $paged;
    
    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
    echo ' - ' . sprintf( __( 'Page %s', 'shape' ), max( $paged, $page ) );
    
    ?>
    
    </title>
    
    <style>
    <?php
    include 'stylesheet.php';
    ?>
    </style>
    
    <?php wp_head(); ?>
    </head>
    <body>
    
    <div id="wrapper">
    
    <div id="menubar">
    
    <?php
    $args = array(
            'depth'       => 0,
      'sort_column' => 'menu_order, post_title',
      'menu_class'  => 'navmenu',
      'include'     => '',
      'exclude'     => '',
      'echo'        => true,
      'show_home'   => false,
      'link_before' => '',
      'link_after'  => '' );
    
    $defaults = array(
      'theme_location'  => '',
      'menu'            => '',
      'container'       => 'div',
      'container_class' => 'navmenu',
      'container_id'    => '',
      'menu_class'      => 'navmenu',
      'menu_id'         => '',
      'echo'            => true,
      'fallback_cb'     => 'wp_page_menu',
      'before'          => '',
      'after'           => '',
      'link_before'     => '',
      'link_after'      => '',
      'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
      'depth'           => 0,
      'walker'          => ''
    );
    ?>
    <a href="javascript:toggleDiv('myContent');"  style="float: right; margin-right: 16px; margin-top: 6px; margin-bottom: 4px;"><div id="catlines";></div></a>
    <?php wp_nav_menu( $defaults ); ?>
    </div>
    <div id="header">
    
    <?php
    include 'searchform.php';
    
    if($logo){echo'<a href="'.$siteUrl.'"><img src="'.$logo.'" style="float: '.$logo_placement.';padding-right: 24px;"></a>';}
    else{echo'<div><a href="'.$siteUrl.'" style="color: '.$header_text_color.';  font-size: 32px; padding-right: 24px; float: '.$logo_placement.';">'.$site_name.'</a></div>';
    echo'<div style="color: '.$header_text_color.'; font-size: 16px; padding-right: 24px; clear: '.$logo_placement.'; float: '.$logo_placement.';">'.$site_description.'</div>';
    }
    
    ?>
    
    <div id="header_sidebar">
    
    <?php// wp_page_menu($args); ?>
    
    </div>
    </div>
    <?php include 'sidebarLeft.php'; ?>
    <div id="header2">
    
    <?php
    if(is_page( 'Home' )){
    if(is_active_sidebar('homepage-header')){
     dynamic_sidebar('homepage-header');
     }
    }
    
    if(!is_page( 'Home' )){
     if(is_active_sidebar('header-area')){
     dynamic_sidebar('header-area');
     }
     }
    ?>
    </div>
    <div>
    </div>

    The test site I put up is http://www.thechineseconnection.co.uk

    I don’t know if the information I have given is enough for anybody to respond.

    Any help would be appreciated.

    Thanks

    Mike

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Mike

    Where do you usually set the logo size ? Is there a theme options panel ?

    Are those options set?

    This is messy code.

    Thread Starter mike14017

    (@mike14017)

    Hi

    The logo, graphics, colours etc are set through the customizing panel. There is no where to set the size of the logo, and looking at the code it doesn’t show there either.

    Sorry I’m not a coder,I can look at it and try to work out what it is supposed to do, but apart from that I’m a complete novice.

    If this helps, this is the content of functions.php

    <?php
    /**
     * Adds the individual sections, settings, and controls to the theme customizer
     */
    function example_customizer( $wp_customize ) {
        $wp_customize->add_section(
            'example_section_one',
            array(
                'title' => 'Graphics',
                'description' => 'This is a settings section.',
                'priority' => 10,
            )
        );
    
    $wp_customize->add_setting(
        'logo_placement',
        array(
            'default' => 'left',
        )
    );
    
    $wp_customize->add_control(
        'logo_placement',
        array(
            'type' => 'radio',
            'label' => 'Logo Placement',
            'section' => 'example_section_one',
            'choices' => array(
                'left' => 'Left',
                'right' => 'Right',
                'center' => 'Center',
            ),
        )
    );
    
    $wp_customize->add_setting( 'img-upload' );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'img-upload',
            array(
                'label' => 'Logo Upload',
                'section' => 'example_section_one',
                'settings' => 'img-upload'
            )
        )
    );
    
    $wp_customize->add_setting( 'header-upload' );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'header-upload',
            array(
                'label' => 'Header Background',
                'section' => 'example_section_one',
                'settings' => 'header-upload'
            )
        )
    );
    
    $wp_customize->add_setting( 'button-upload' );
    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'button-upload',
            array(
                'label' => 'Button Upload',
                'section' => 'example_section_one',
                'settings' => 'button-upload'
            )
        )
    );
    
    $wp_customize->add_setting(
        'header-background-color',
        array(
            'default' => '#ffffff',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'header-background-color',
            array(
                'label' => 'Header Background Color',
                'section' => 'colors',
                'settings' => 'header-background-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'header-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'header-text-color',
            array(
                'label' => 'Header Text Color',
                'section' => 'colors',
                'settings' => 'header-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'mainmenu-background-color',
        array(
            'default' => '#2A628C',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'mainmenu-background-color',
            array(
                'label' => 'Top Menu Background Color',
                'section' => 'colors',
                'settings' => 'mainmenu-background-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'mainmenu-text-color',
        array(
            'default' => '#ffffff',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'mainmenu-text-color',
            array(
                'label' => 'Top Menu Text Color',
                'section' => 'colors',
                'settings' => 'mainmenu-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'mainmenu-highlight-color',
        array(
            'default' => '#347BAF',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'mainmenu-highlight-color',
            array(
                'label' => 'Top Menu Highlight Color',
                'section' => 'colors',
                'settings' => 'mainmenu-highlight-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-heading-color',
        array(
            'default' => '#e5e5e5',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'content-heading-color',
            array(
                'label' => 'Content Heading Background Color',
                'section' => 'colors',
                'settings' => 'content-heading-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-heading-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'content-heading-text-color',
            array(
                'label' => 'Content Heading Text Color',
                'section' => 'colors',
                'settings' => 'content-heading-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'submenubar-color',
        array(
            'default' => '#2A628C',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'submenubar-color',
            array(
                'label' => 'Content Footer Background Color',
                'section' => 'colors',
                'settings' => 'submenubar-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'submenubar-text-color',
        array(
            'default' => '#FFFFFF',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'submenubar-text-color',
            array(
                'label' => 'Content Footer Text Color',
                'section' => 'colors',
                'settings' => 'submenubar-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'page-color',
        array(
            'default' => '#f7f7f7',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'page-color',
            array(
                'label' => 'Content Page Color',
                'section' => 'colors',
                'settings' => 'page-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'content-text-color',
            array(
                'label' => 'Content Text Color',
                'section' => 'colors',
                'settings' => 'content-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-box-color',
        array(
            'default' => '#e5e5e5',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'content-box-color',
            array(
                'label' => 'Content Box Color',
                'section' => 'colors',
                'settings' => 'content-box-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-box-highlight-color',
        array(
            'default' => '#d1d1d1',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'content-box-highlight-color',
            array(
                'label' => 'Content Box Hightlight Color',
                'section' => 'colors',
                'settings' => 'content-box-highlight-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'content-box-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            '',
            array(
                'label' => 'Content Box Text Color',
                'section' => 'colors',
                'settings' => 'content-box-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'shadow-color',
        array(
            'default' => '#808080',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'shadow-color',
            array(
                'label' => 'Content Shadow Color',
                'section' => 'colors',
                'settings' => 'shadow-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'footer-background-color',
        array(
            'default' => '#262626',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'footer-background-color',
            array(
                'label' => 'Footer Background Color',
                'section' => 'colors',
                'settings' => 'footer-background-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'footer-text-color',
        array(
            'default' => '#FFFFFF',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'footer-text-color',
            array(
                'label' => 'Footer Text Color',
                'section' => 'colors',
                'settings' => 'footer-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'sidebar-heading-color',
        array(
            'default' => '#e5e5e5',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'sidebar-heading-color',
            array(
                'label' => 'Sidebar Heading Background Color',
                'section' => 'colors',
                'settings' => 'sidebar-heading-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'sidebar-heading-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'sidebar-heading-text-color',
            array(
                'label' => 'Sidebar Heading Text Color',
                'section' => 'colors',
                'settings' => 'sidebar-heading-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'sidebar-page-color',
        array(
            'default' => '#f7f7f7',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'sidebar-page-color',
            array(
                'label' => 'Sidebar Page Color',
                'section' => 'colors',
                'settings' => 'sidebar-page-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'sidebar-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'sidebar-text-color',
            array(
                'label' => 'Sidebar Text Color',
                'section' => 'colors',
                'settings' => 'sidebar-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'button-color',
        array(
            'default' => '#2A628C',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'button-color',
            array(
                'label' => 'Button Background Color',
                'section' => 'colors',
                'settings' => 'button-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'button-text-color',
        array(
            'default' => '#ffffff',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'button-text-color',
            array(
                'label' => 'Button Text Color',
                'section' => 'colors',
                'settings' => 'button-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'code-color',
        array(
            'default' => '#FFDE79',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'code-color',
            array(
                'label' => 'Code Background Color',
                'section' => 'colors',
                'settings' => 'code-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'code-text-color',
        array(
            'default' => '#000000',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'code-text-color',
            array(
                'label' => 'Code Text Color',
                'section' => 'colors',
                'settings' => 'code-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'ctr-color',
        array(
            'default' => '#2a628c',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'ctr-color',
            array(
                'label' => 'CTR Background Color',
                'section' => 'colors',
                'settings' => 'ctr-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'ctr-text-color',
        array(
            'default' => '#ffffff',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'ctr-text-color',
            array(
                'label' => 'CTR Text Color',
                'section' => 'colors',
                'settings' => 'ctr-text-color'
            )
        )
    );
    
    $wp_customize->add_setting(
        'search-box-color',
        array(
            'default' => '#e5e5e5',
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'search-box-color',
            array(
                'label' => 'Search Box Background Color',
                'section' => 'colors',
                'settings' => 'search-box-color'
            )
        )
    );
    
    }
    add_action( 'customize_register', 'example_customizer' );
    
    function SearchFilter($query) {
    if ($query->is_search) {
    $query->set('post_type', 'post');
    }
    return $query;
    }
    
    add_filter('pre_get_posts','SearchFilter');
    
    $defaults = array(
      'default-color'          => '#ffffff',
      'default-image'          => '',
      'wp-head-callback'       => '_custom_background_cb',
      'admin-head-callback'    => '',
      'admin-preview-callback' => ''
    );
    add_theme_support( 'custom-background', $defaults );
    
    add_theme_support( 'title-tag' );
    
    // Numbered Pagination
    if ( !function_exists( 'wpex_pagination' ) ) {
    
      function wpex_pagination() {
    
        $prev_arrow = is_rtl() ? '&rarr;' : '&larr;';
        $next_arrow = is_rtl() ? '&larr;' : '&rarr;';
    
        global $wp_query;
        $total = $wp_query->max_num_pages;
        $big = 999999999; // need an unlikely integer
        if( $total > 1 )  {
           if( !$current_page = get_query_var('paged') )
             $current_page = 1;
           if( get_option('permalink_structure') ) {
             $format = 'page/%#%/';
           } else {
             $format = '&paged=%#%';
           }
          echo paginate_links(array(
            'base'      => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
            'format'    => $format,
            'current'    => max( 1, get_query_var('paged') ),
            'total'     => $total,
            'mid_size'    => 3,
            'type'       => 'list',
            'prev_text'    => $prev_arrow,
            'next_text'    => $next_arrow,
           ) );
        }
      }
    
    }
    
    register_sidebar( array(
     'name' => 'Sidebar Right',
     'id' => 'sidebar-right',
     'description' => 'Appears in the sidebar right area',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
    
    register_sidebar( array(
     'name' => 'Footer Sidebar 1',
     'id' => 'footer-sidebar-1',
     'description' => 'Appears in the footer area',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
     register_sidebar( array(
     'name' => 'Footer Sidebar 2',
     'id' => 'footer-sidebar-2',
     'description' => 'Appears in the footer area',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
     register_sidebar( array(
     'name' => 'Footer Sidebar 3',
     'id' => 'footer-sidebar-3',
     'description' => 'Appears in the footer area',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
     register_sidebar( array(
     'name' => 'Footer Sidebar 4',
     'id' => 'footer-sidebar-4',
     'description' => 'Spans footer 1,2,3',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
    
      register_sidebar( array(
     'name' => 'Header Area',
     'id' => 'header-area',
     'description' => 'Appears below main menu',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
    
      register_sidebar( array(
     'name' => 'Homepage Header',
     'id' => 'homepage-header',
     'description' => 'Appears on home page',
     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     'after_widget' => '</aside>',
     'before_title' => '<h3 class="widget-title">',
     'after_title' => '</h3>',
     ) );
    
    add_filter('widget_text', 'do_shortcode');
    ?>

    Thanks for looking

    Mike

    Thread Starter mike14017

    (@mike14017)

    Hi

    I just took a look at index.php here are the contents

    <?php
    //include 'config.php';
    include_once('functions.php');
    
    get_header();
    
    get_sidebar();
    ?>
    
    <div id="content">
    
    <?php
    $s =$_REQUEST['s'];
    $s=str_replace('"','',$s);
    $s=StripSlashes($s);
    $category = get_the_category();
    if (is_category()) {
        $c = $category[0]->cat_name;}
    if($c or $s){
    echo'<div id="searchH">
    '.$s.'
    '.$c.'
    </div>';
    }
    
    $logoSize = get_option('icsmpl_logoSize', $logoSize);
    $imageSize = get_option('icsmpl_imageSize', $imageSize);
    
    if($logoSize==""){$logoSize="120";}
    if($imageSize==""){$imageSize="120";}
    
    if($imageSize > $logoSize){$margin=$imageSize;} else {$margin=$logoSize;}
    
    $template = get_option('icsmpl_template', $template);
    
    if($template==""){$template="template1";}
    
    if (have_posts()) : while (have_posts()) : the_post();
    ?>
    
    <div id="offerarea">
    <?php
    $post_id = $post->ID;
    $affiliateUrl = get_post_meta(get_the_ID(), 'affiliateUrl', true);
    $voucherCode = get_post_meta(get_the_ID(), 'code', true);
    $merchantLogoUrl = get_post_meta(get_the_ID(), 'merchantLogoUrl', true);
    $merchant = get_post_meta(get_the_ID(), 'merchant', true);
    $imgUrl = get_post_meta(get_the_ID(), 'imgUrl', true);
    $offersEndDate = get_post_meta(get_the_ID(), 'offers-end-date', true);
    $codesEndDate = get_post_meta(get_the_ID(), 'codes-end-date', true);
    $startDate = get_post_meta(get_the_ID(), 'startDate', true);
    $dateAdded = get_post_meta(get_the_ID(), 'dateAdded', true);
    
    $catName=get_the_category( $post_id );
    $title=get_the_title( $post_id );
    $permalink = get_permalink( $post_id );
    
    $content=get_the_content( $post_id );
    
    $merchant=trim($merchant);
    $search_match=urlencode('"'.$merchant.'"');
    
    if(!is_page()) {
    include "$template.php";}
    else{
    echo'<p class="title">'.$title.'</p>';
    echo'<p class="content">'.apply_filters('the_content',$content).'</p>';}
    
    ?>
    
    </div>
    <?php endwhile;?>
    
    <div>
    
    <?php
    if(!is_single()) {
    
    wpex_pagination();}
    ?>
    </div>
    
    <?php
    if(is_single()) {
    include ('related_posts.php');
    }
    ?>
    
    <?php else: ?>
    
    <p class="noposts"><?php _e('Sorry, no posts matched your criteria.');
    include 'related_posts_amazon.php';
    ?></p><?php endif; ?>
    
    </div>
    
    <div id="delimiter">
    </div>
    <?php get_footer(); ?>
    </div>

    Thanks

    Mike

    Hi

    The problem is due to a few options either not being defined / theme errors (coding)

    The theme authors need to step in and help with this as it’s difficult to bug fix when I have no personal experience with this particular theme / access to it.

    Alternatively you can hire a freelancer to assist you.

    Thread Starter mike14017

    (@mike14017)

    Hi

    I appreciate the time you’ve taken to look at this.

    Could I ask, what options need to be defined or where can I read up on this to see if I can let the authors know what needs to be done.

    As you can see from their comment above they have checked as far as they can.

    Thanks

    Mike

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Problems don't know where to start’ is closed to new replies.