• 0

Editing the Search Field Text

Question

Posted · Report post

I have been trying for days to edit the search field default text and nothing I have tried works. Nothing others have suggested works. I have this searchform.php copied from the main template into my child template, but I don't know what to put in this php page to change the default text. Any help would be much appreciated. Here is what is currently in searchform.php file

<?php
	/**
	 * SEARCH FORM
	 *
	 * PageLines search form
	 *
	 * @package     PageLines Framework
	 * @since       1.0
	 *
	 * @link        http://www.pagelines.com/
	 * @link        http://www.pagelines.com/tour
	 *
	 * @author      PageLines   http://www.pagelines.com/
	 * @copyright   Copyright (c) 2008-2012, PageLines  hello@pagelines.com
	 *
	 * @usedby get_search_form
	 * @internal $echo is passed from that function
	 *
	 * @internal    last revised January 20, 2012
	 * @version     ...
	 *
	 * @todo Define version
	 * @todo clarify *usedby and *internal
	 */
	
	pagelines_search_form( true );
	
	

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hey @buwebservices, You needed to look a little deeper at the code behind the [u]pagelines_search_form[/u] function. Just add this filter to your child theme's or pagelines customize plugin's functions.php file. Just change where it says: "YOUR SEARCH FIELD TEXT" to whatever text you want there! [code]add_filter('pagelines_search_form','override_search_form'); function override_search_form() { $searchfield = sprintf('', 'YOUR SEARCH FIELD TEXT'); // modify here $searchform = sprintf('
%s
', home_url(), $searchfield); return $searchform; }[/code]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

This worked perfectly! Thank you so much!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello,

 

I am new about html and css. Where can I find the Pagelines Search form function? Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now