• Hell guys. I used chrome inspect element to locate html input placeholder “search”. And i need to change that placeholder text.
    I know that in wp php generates html.
    But how do i access that html code that chrome inspect detected?
    I tried everywhere in my wp folder, opened each php file but there is only php code there not html.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Could you give a little more detail about what you are trying to accomplish? Is the “search” text that you are trying to replace in a widget, plugin, page etc?

    Do you have an address you could share?

    You can always do such things with JavaScript (or even better with jQuery)!

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(“input[placeholder=’search’]”).attr(“placeholder”, “Your Text”);
    }
    </script>

    Put this scrip either at the bottom of the page where you have this search field.
    Or, if this field is on every page, place it in header, or footer.
    Cheers!

    Thread Starter alexemakovsk

    (@alexemakovsk)

    @hexegg. Where and how to I insert this peace of code?

    This is what I need to change. “Any text” in place holder
    <input type=”text” value=”” placeholder=”any text” autocomplete=”off”>

    You need to install a plugin that allows to add scripts to you site’s header or footer. Search for Header and Footer Script on wordpress plugin page. Then copy my script and insert in in header (via settings page of the plugin you installed).

    Here is the script again:
    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(“input[placeholder=’search’]”).attr(“placeholder”, “any text”);
    }
    </script>

    Assuming you’re changing a placeholder named “search” with “any text”.

    It overly complicates an answer when you have to answer things generically.

    There are easier ways to make changes depending on if the search box you are using is a part of a plugin, the default WP search or something custom.

    If you can share the address of the page you are trying to modify or at the very least a screenshot, it makes it far easier to give an answer specific to your situation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Edit html file’ is closed to new replies.