Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <!-- INFOSPACE START-->
- <?php
- require_once 'class.InfoSpaceRequestSigner.php';
- $token = 'yVJhbD-yaUqjo-6hZ0gTfg2';
- $signer = new InfoSpaceRequestSigner($token);
- $_ip = urlencode($_SERVER['REMOTE_ADDR']);
- $_ua = urlencode($_SERVER['HTTP_USER_AGENT']);
- $signedUrl = str_replace('&signature=', '', $signer->signUrl(''));
- $_click_tracking = "http://partner.clickserver.com/ClickHandler?parterCustomParamter=value1&secondParameter=value2&httpheaders=User-Agent%3d" . $_ua . "&enduserip=" . $_ip;
- $search_URL = '/?s=' . str_replace(' ', '+', $_GET['s']);
- ?>
- <?php
- $is = new InfoSpaceRequestSigner( $token );
- $signature = $is->getSignature( $queryTerm );
- ?>
- <!-- INFOSPACE END-->
- <div class="archive-wrap">
- <div class="archive-head clearfix">
- <div class="archive-title clearfix">
- <h1><?php printf( __( 'Search Results for "%s"', 'abomb' ), get_search_query() ); ?></h1>
- <a class="rss-link" href="<?php echo esc_url(get_search_feed_link( get_search_query() )); ?>" target="_blank"><i class="fa fa-rss deskpadview"></i></a>
- </div>
- </div>
- <div class="archive-search clearfix">
- <p><?php echo __("If you're not happy with the results, please do another search.","abomb"); ?></p>
- <?php get_search_form(); ?>
- </div>
- <?php
- $post_loop_count = 1;
- $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
- if($page > 1) $post_loop_count = ((int) ($page - 1) * (int) get_query_var('posts_per_page')) +1;
- ?>
- <div class="block">
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <div class="search-post clearfix" itemscope="itemscope" itemtype="<?php echo rd_ssl(); ?>://schema.org/BlogPosting">
- <span class="search-number el-left"><?php echo $post_loop_count; ?></span>
- <div class="entry-header">
- <?php echo content_title(); ?>
- <div class="entry-meta">
- <?php echo __('By','abomb'); ?> <span class="meta-author"><?php echo the_author_posts_link(); ?></span> - <?php echo content_meta_complete_date(); ?>
- </div>
- </div>
- <div class="entry-content">
- <?php echo word_count(get_the_excerpt(),40); ?>
- </div>
- </div>
- <?php $post_loop_count++; ?>
- <?php endwhile; wp_reset_postdata(); ?>
- <?php rd_pagination(); ?>
- <!-- INFOSPACE -->
- <div id="topResults"></div>
- <div id="bottomResults"></div>
- <div id="relatedResults"></div>
- <div id="mainResults"></div>
- <script type="text/javascript">
- insp.search.doSearch({
- query: '<?php echo $_GET['q']; ?>',
- accessId: 'find.find8',
- signature: '<?php echo $signedUrl; ?>',
- category: "web",
- page: 1,
- googleAdLinesCount: 3,
- containers: {
- "top": {id:"topResults"},
- "main": {id:"mainResults"},
- "bottom": {id:"bottomResults"},
- "related": {id:"relatedResults"}
- },
- clickTrackingUrl: '<?php echo $_click_tracking; ?>',
- searchUrlFormat: "/?s={searchTerm}",
- onComplete: function(complete) {
- },
- onError: function(error) {
- }
- });
- </script>
- <!-- INFOSPACE END-->
- <?php else: ?>
- <div class="block search-post clearfix">
- <div class="search-number el-left"><i class="fa fa-exclamation"></i></div>
- <div class="entry-content no-post">
- <?php echo __('Sorry, no posts matched your criteria. Please try another search.','abomb'); ?>
- </div>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement