• Hi

    I have created a clickable uk map with regions (virginads.co.uk)

    I would like to add links to my map – adverts would be sorted by regions (have got many other custom fields).

    custom field: Region
    alternative: id=5

    Field values: South East,London,South West,East of England,Yorkshire and the Humberside,Wales,Scotland,West Midlands,East Midlands,North West,North East,North Ireland,Other

    also have aded to functions.php

    function my_queryable_custom_fields() {
        register_queryable_custom_field( 'Region' );
    }
    add_action('init', 'my_queryable_custom_fields');

    sample of used href: href=”http://www.virginads.co.uk/?Region=South%20East

    It seams that everything should be fine – but nothing appears and i’m getting this “Whoops! Page Not Found. The page or ad listing you are trying to reach no longer exists or has expired.”

    Is it possible because I use custom template? .. They have separated posts and ads.

    here is a link sample for function Add New Advertisemt
    http://www.virginads.co.uk/wp-admin/post-new.php?post_type=ad_listing

    this is their taxonomy file for creating new categories for ads:

    <?php get_header(); ?>
    
    <!-- CONTENT -->
      <div class="content">
    
        <div class="content_botbg">
    
          <div class="content_res">
    
            <div id="breadcrumb">
    
              <?php if(function_exists('cp_breadcrumb')) cp_breadcrumb(); ?>
    
            </div>
    
            <!-- left block -->
            <div class="content_left">
    
                <?php
    				// show only ads within this specific category
    				$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
    				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    				query_posts(array('post_type' => 'ad_listing', 'ad_cat' => $term->slug, 'caller_get_posts' => 1, 'paged' => $paged));
    			?>
    
                <div class="shadowblock_out">
    
                    <div class="shadowblock">
    
                      <div id="catrss"><a href="<?php echo get_term_link($term, $taxonomy); ?>feed/"><img src="<?php bloginfo('template_url'); ?>/images/rss.png" width="16" height="16" alt="<?php echo $term->name; ?> <?php _e('RSS Feed', 'appthemes') ?>" title="<?php echo $term->name; ?> <?php _e('RSS Feed', 'appthemes') ?>" /></a></div>
                      <h1 class="single dotted"><?php _e('Listings for','appthemes')?> <?php echo $term->name; ?> (<?php echo $wp_query->found_posts ?>)</h1>
    
    				  <p><?php echo $term->description; ?></p>
    
                    </div><!-- /shadowblock -->
    
                </div><!-- /shadowblock_out -->
    
                    <?php get_template_part( 'loop', 'ad' ); ?>
    
    	</div><!-- /content_left -->
    
            <?php get_sidebar(); ?>
    
            <div class="clr"></div>
    
          </div><!-- /content_res -->
    
        </div><!-- /content_botbg -->
    
      </div><!-- /content -->
    
    <?php get_footer(); ?>

    .. and another one for ad tags

    <?php get_header(); ?>
    
    <!-- CONTENT -->
      <div class="content">
    
        <div class="content_botbg">
    
          <div class="content_res">
    
            <div id="breadcrumb">
    
              <?php if(function_exists('cp_breadcrumb')) cp_breadcrumb(); ?>
    
            </div>
    
            <!-- left block -->
            <div class="content_left">            
    
    			<?php
    				// show only ads within this specific tag
    				$term = get_term_by( 'slug', get_query_var( 'ad_tag' ), 'ad_tag' );
    				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    				query_posts(array('post_type' => 'ad_listing', 'ad_tag' => $term->slug, 'caller_get_posts' => 1, 'paged' => $paged));
    			?>
    
                <div class="shadowblock_out">
    
                    <div class="shadowblock">
    
                      <div id="catrss"><a href="<?php echo get_term_link($term, $taxonomy); ?>feed/"><img src="<?php bloginfo('template_url'); ?>/images/rss.png" width="16" height="16" alt="<?php echo $term->name; ?> <?php _e('RSS Feed', 'appthemes') ?>" title="<?php echo $term->name; ?> <?php _e('RSS Feed', 'appthemes') ?>" /></a></div>
                      <h2><?php _e('Listings tagged with','appthemes')?> '<?php echo $term->name; ?>' (<?php echo $wp_query->found_posts ?>)</h2>
    
                    </div><!-- /shadowblock -->
    
                </div><!-- /shadowblock_out -->				
    
                    <?php get_template_part( 'loop', 'ad' ); ?>
    
    	</div><!-- /content_left -->
    
            <?php get_sidebar(); ?>
    
            <div class="clr"></div>
    
          </div><!-- /content_res -->
    
        </div><!-- /content_botbg -->
    
      </div><!-- /content -->
    
    <?php get_footer(); ?>

    what should I do?

    thank You in advance, Helmuts

    http://wordpress.org/extend/plugins/query-custom-fields/

  • The topic ‘[Plugin: Query Custom Fields] Please help – I am missing something’ is closed to new replies.