• Resolved ssqm20

    (@ssqm20)


    Hello,

    Is there a way to add shortcode to archive pages that appear after search?

    Thanks

    • This topic was modified 4 years ago by James Huff. Reason: link moved to proper field

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • hzlateska

    (@hzlateska)

    At the moment this is possible only by modifying the a template file through a child theme. The file that should be modified is “template-parts/content/content-none.php”. Add your content below this code:

    printf(
    	'<p>' . wp_kses( __( 'Sorry, no results were found. Please try again with different keywords.', 'sinatra' ), sinatra_get_allowed_html_tags() ) . '</p>'
    );
    get_search_form();

    Next theme update will have an action hook that you can use to add content without modifying the template files.

    Thread Starter ssqm20

    (@ssqm20)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode on archive’ is closed to new replies.