Title: Syntax error when adding do_shortcode
Last modified: June 9, 2020

---

# Syntax error when adding do_shortcode

 *  [rommeltje](https://wordpress.org/support/users/rommeltje/)
 * (@rommeltje)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-when-adding-do_shortcode/)
 * Hello,
 * I’m trying to add this plugin to my theme. Following the instructions, I add 
   the line
 * `<?php echo do_shortcode( '[searchandfilter fields="search,category,post_tag"]');?
   >`
 * to the end(? not sure if that’s right) of the functions.php of my theme. But 
   when I click Update File, it says:
 * > syntax error, unexpected ‘<‘, expecting end of file
 * What am I doing wrong?

The topic ‘Syntax error when adding do_shortcode’ is closed to new replies.

 * ![](https://ps.w.org/search-filter/assets/icon-256x256.png?rev=3096093)
 * [Search & Filter](https://wordpress.org/plugins/search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-filter/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [rommeltje](https://wordpress.org/support/users/rommeltje/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-when-adding-do_shortcode/)
 * Status: not resolved