mike14017
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problems don't know where to startHi
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
Forum: Fixing WordPress
In reply to: Problems don't know where to startHi
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
Forum: Fixing WordPress
In reply to: Problems don't know where to startHi
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() ? '→' : '←'; $next_arrow = is_rtl() ? '←' : '→'; 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
Hi
Linux
Forum: Fixing WordPress
In reply to: List from custom fieldHi
$merchant is the name of the custom field I want to use. The script above will produce a list of every name in this field in alphabetical order. What I also want is when a visitor clicks on a name it will show every post associated/linked with that name/custom field.
I hope that explains it.
Thanks
Mike
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Custom Fields in RelevanssiHi
I’ve re-entered the custom field merchant and reindexed, but the search still does not seem to be showing the field.
If you have a look at https://www.zipbang.co.uk/vouchersandoffers/ and type in comet it shows 5 results, all of these have comet in the excerpt, but I know that there are 58 that should show up because the admin search works.
Thanks
Mike