How to place the search form code in an article on Wordpress

This article describes how to insert the code of the search form into the article of the site running on Wordpress (if you don't want to use the plugin for some reason).

Switch from the "Visual" mode to the "Text" mode while in the Article Editor.

 mceclip1.png

In this mode, all elements of text formatting (bold font, images, headings, etc.) are in the form of html code.

The only thing left to do now is to insert the code of the search form or widget in the article. To place the code of the airline ticket search form, login to your Partner's Personal Cabinet, go to the Programs section, select an Aviasales/Jetradar or Hotellook program, open the Tools tab and click the Search Forms link.

Once the search form is created and configured, copy its code and paste it into the article.

Copy:

mceclip2.png

Paste:

 mceclip4.png

 Why is the text "form beginning", "form end" added on the screenshot? Once the form is placed, it is not displayed in the Visual Editor and Preview. It's only visible on the page after it's been published.

Therefore, if you switch back to the Visual Editor and continue writing the article, you may delete or damage the search form code. The text that separates the beginning and end of the code from the rest of the content is removed before the article is published. You can do it in the "Text" mode so that you don't damage the search form code.

Use the Shortcoder plugin to optimize the placement of code in your articles. Once installed, open the Wordpress Control Panel, go to Settings, and select the Shortcoder menu item. Write the code name by which it will be called in the text of the article using the plugin and insert the code of the search form itself.

mceclip5.png

Once the code is saved, go to the Article Editor, click on the Shortcoder plugin icon in the Edit Panel, and select the desired code. Or write the code call in the text of the article yourself.

 mceclip6.png

Was this article helpful?

Have more questions? Submit a request