How to remove attachment.php body get_search_form() ?
-
Hi there,
I’ve been trying to build on top of the single.php template with an if loop that uses
attachment.php when directed from permalink with media attached, which then uses content_none.php to displayget_search_form()
.I’ve tried to remove
get_search_form()
and related<h2>
,<p>
tags from the body of an attachment.php with an if/ else statement, which only displays if loop and the"Nothing Found... It seems we can't find what you're looking for. Perhaps searching can help."
<p>
tag and search form or just the if loop and no single.php template.The single.php template is important because it is being used to display the media attachment (audio, video, and images) above the if loop I mentioned above.
I’ve also tried to
remove_action( 'wp_body_open', get_search_form() );
in an if loop, however that gives me duplicate get_search_form… which lead in search for an Exs-Newswp_body_open
hook, which I am unable to find under parent theme (Exs).Is there a exs-news body hook?
or is another way to remove content_none.php get_search_form() and related elements?
- The topic ‘How to remove attachment.php body get_search_form() ?’ is closed to new replies.