( ! ) Warning: getimagesize(/srv/users/serverpilot/apps/curtismchale-personalsite/public/files/2012/04/index-now-800.jpg): failed to open stream: No such file or directory in /srv/users/serverpilot/apps/curtismchale-personalsite/public/wp-content/plugins/elevate-seo/src/facebook.php on line 49
Call Stack
#TimeMemoryFunctionLocation
10.0001355856{main}( ).../index.php:0
20.0001356144require( '/srv/users/serverpilot/apps/curtismchale-personalsite/public/wp-blog-header.php' ).../index.php:17
30.611616051112require_once( '/srv/users/serverpilot/apps/curtismchale-personalsite/public/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.614715981792include( '/srv/users/serverpilot/apps/curtismchale-personalsite/public/wp-content/themes/curtismchale-2018/single.php' ).../template-loader.php:74
50.614715981792get_header( ).../single.php:10
60.614715982920locate_template( ).../general-template.php:41
70.614715983080load_template( ).../template.php:647
80.614815983528require_once( '/srv/users/serverpilot/apps/curtismchale-personalsite/public/wp-content/themes/curtismchale-2018/header.php' ).../template.php:688
90.615215984280wp_head( ).../header.php:21
100.615215984280do_action( ).../general-template.php:2614
110.615215984656WP_Hook->do_action( ).../plugin.php:453
120.615215984656WP_Hook->apply_filters( ).../class-wp-hook.php:310
130.710216228272ElevatePlugin->handle_wp_head( ).../class-wp-hook.php:286
140.710216228272ElevatePlugin->_output_meta_fields( ).../elevate-class.php:2809
150.713116229544ElevatePlugin->_maybe_output_social_tags( ).../elevate-class.php:2594
160.713216230768ElevateFacebook->output_meta( ).../elevate-class.php:2363
170.713316230896getimagesize ( ).../facebook.php:49

Google Custom Search

I recently added google custom search (CSE) as an advanced search on a clients store. While the standard search engine provided decent results it does a very poor job of eliminating useless words (the, a…). Since Goolge does an awesome job of providing relevant search results and the CSE is free we jumped on board.

To get Google CSE implemented check out a great article on Dosh Dosh that is very detailed. This is in fact where I started.

My first hurdle with implementation was that the site content was not indexed by google and no sitemap was generated either. Off I trucked to Godaddy’s admin panel and used their admin features to create a new sitemap.

index-now-800

 

Google CSE provides a mechanism for submitting a new sitemap for search indexing. Under the Google CSE control panel select ‘indexing’ and use the ‘On-demand indexing’ option near the bottom of the page. Point it at your new sitemap and you’re off to the races. Once your sitemap is submitted your site will be crawled in a few days.

Once your content is indexed you can actually test your search engine (testing instructions included in the Dosh Dosh article.)

The biggest problem I ran into while trying to get this working at my job was getting the width to fit inside my design. We are a non-profit organization and as such are eligible to use Google CSE without displaying any adds, which is were my problem really comes from.

With the Google CSE you are limited to a minimum size of 500px if you choose to display adds on the top and bottom and 795px if you display adds on the side of the search results. As I was not displaying adds I didn’t think that this would have any bearing on my implementation of it. Boy was I wrong.

If you need to get the results down to the minimum width of 500px you need to adjust two places in the code.forid-11-939

 

First off is in the form submission end of the process. The variable ‘forid’ needs to be changed to 11. ‘Forid’ is the variable that desinates where the adds will be placed. As I stated earlier, we were not displaying any adds so I didn’t even think about changing this. Also there is no clear documentation that this variable exists in the submission form portion of the Google CSE.

Once you have your variable changed (this is also possible when setting the form up by choosing to display adds on the top and bottom) you can go to the page you designated for results and change the actual frame width.search-frame-width-1051

 

Remember with the adds being displayed on the top and bottom your minimum width is 500px.

To get a head start, join thousands of other men and Stop The Struggle.

Get my free eBook to help you stop working all the hours without traction.

You’ll also get a weekly email with good resources to help you do family with the same intention you do your work. Both need to run well if you want to win.

%d bloggers like this: