Sanjeev Sabhlok's notes on technology, hardware, gardening

Category: Wordpress

Remove search option in WordPress (whitehouse)

Two steps:

1) Remove everything from searchform.php

<form method="get" id="searchform" class="" action="<?php bloginfo('home'); ?>/">

<fieldset>
<input type="text" value="<?php _e('Search',TDOMAIN);?>" name="s" id="s" onfocus="if (this.value == '<?php _e('Search',TDOMAIN);?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Search',TDOMAIN);?>';}" />
 
<input type="image" value="Go" src="<?php echo THEME_IMAGES;?>/search-btn.png" class="submit btn" />
</fieldset>
</form>
 
2) Delete the stuff in red from sidebar.php.
 
<div id="sidebar" role="complementary">
 
<?php
global $sidesearch;
if($sidesearch):?>
<div id="sidesearch" class="fix">
<?php include (THEME_LIB . '/_searchform.php'); ?>
</div>
<?php endif;?>
 
<div id="widgets">
<?php if(VPRO) include(THEME_LIB.'/_grandchildnav_pro.php');?>
 
<?php if(pagelines('the_sidebar', $post->ID) == 'secondary'):?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Secondary Sidebar') ) : ?>
<?php _e('The secondary sidebar has been selected but doesn\'t have any widgets. Add some widgets to your secondary sidebar in the admin under appearance > widgets.',TDOMAIN);?>
<?php endif; ?>
<?php elseif(pagelines('the_sidebar', $post->ID) == 'short'):?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Short Sidebar') ) : ?>
<?php _e('The short sidebar has been selected but doesn\'t have any widgets. Add some widgets to your short sidebar in the admin under appearance > widgets.',TDOMAIN);?>
<?php endif; ?>
<?php else:?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php if(!pagelines('sidebar_no_default')) include(THEME_LIB.'/_defaultsidebar.php');?>
<?php endif; ?>
<?php endif;?>
 
</div>
</div>
Continue Reading
Continue Reading

Hindi in WordPress

See http://www.indiblogger.in/forum/topic.php?id=6334

To write and display unicode Hindi font correctly, you have to do some editing in the config.php file of your blog.

Open up ‘wp-config.php’ from the root directory of your WordPress installation.Add ‘//’ at the very beginning of these two lines:define(‘DB_CHARSET’, ‘utf8′);define(‘DB_COLLATE’, ”);So that section should now look like this://define(‘DB_CHARSET’, ‘utf8′);//define(‘DB_COLLATE’, ”);

TROUBLESHOOT:

The inverted commas are now seen as diamond images with a question mark inside them.  Is there a way to fix that? Looks like this is a consequence of fixing the wp-config.php file.

– 

Nothing wrong with wp-config.php file. It may be your theme or plugins issue. I think the problem is with title only. Try to retype the title and update the post

 

 

 


Quite a nuisance with Hindi plugins – none of them are working.

Here's a closest description of the problem:
http://www.flashbird.com/why-characters-is-shown-like-when-i-use-hindi-unicode-in-joomla-in-my-website.html

Solution to my question: http://www.indiblogger.in/forum/topic.php?action=replied&p=45752&action=replied&p=45722&id=6334

Continue Reading