Title: image path in general-template.php
Last modified: August 19, 2016

---

# image path in general-template.php

 *  Resolved [nevilletietz](https://wordpress.org/support/users/nevilletietz/)
 * (@nevilletietz)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/image-path-in-general-templatephp/)
 * My php syntax is not the greatest and I need to change the “submit” button to
   a type=image. What is the correct path name for the image src using the equivalent
   of <?php bloginfo(‘template_directory’); ?> ?
 * _<input type=”image” id=”searchsubmit” value=”‘. esc\_attr\_\_(‘Search’) .'” 
   src=”??????????/images/go.gif” border=”0″/>_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/image-path-in-general-templatephp/#post-1624832)
 * Try `<input type="image" id="searchsubmit" value="'. esc_attr__('Search') .'"
   src="<?php get_bloginfo('template_directory'); ?>/images/go.gif" />`
 *  Thread Starter [nevilletietz](https://wordpress.org/support/users/nevilletietz/)
 * (@nevilletietz)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/image-path-in-general-templatephp/#post-1624839)
 * I originally tried that but it’s not working as the input code lies within a 
   function:
 * function get_search_form($echo = true) {
    do_action( ‘get_search_form’ );
 *  $search_form_template = locate_template(array(‘searchform.php’));
    if ( ” !=
   $search_form_template ) { require($search_form_template); return; }
 *  $form = ‘<form role=”search” method=”get” id=”form1″ action=”‘ . home_url( ‘/’).‘”
   >
    <div> <input type=”text” value=”‘ . get_search_query() . ‘” name=”s” id=”s”/
   > <input type=”image” id=”searchsubmit” value=”‘. esc_attr__(‘Search’) .'” src
   =” <?php bloginfo(‘template_directory’); ?>/images/blank.gif” border=”0″/> </
   div> </form>’;
 *  if ( $echo )
    echo apply_filters(‘get_search_form’, $form); else return apply_filters(‘
   get_search_form’, $form); }
 *  Thread Starter [nevilletietz](https://wordpress.org/support/users/nevilletietz/)
 * (@nevilletietz)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/image-path-in-general-templatephp/#post-1624864)
 * I worked it out finally:
    _ <input type=”image” id=”searchsubmit” value=”‘. esc\
   _attr\_\_(‘Search’) .'” src=”‘. get\_bloginfo(‘template\_directory’) .’/images/
   blank.gif” border=”0″/>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘image path in general-template.php’ is closed to new replies.

## Tags

 * [general-template.php](https://wordpress.org/support/topic-tag/general-template-php/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [image path](https://wordpress.org/support/topic-tag/image-path/)
 * [input](https://wordpress.org/support/topic-tag/input/)
 * [template directory](https://wordpress.org/support/topic-tag/template-directory/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [nevilletietz](https://wordpress.org/support/users/nevilletietz/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/image-path-in-general-templatephp/#post-1624864)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
