I've searched all about for this but can't find anything so have created my own thread.
i basically want to create a second search function which is available only to logged in users and which allows them to search only their own posts, but at the same time keeping the first search function (available to all) which searches all the posts. I am using the Sidebar Login plugin and so thought i could paste some code in there (to the 'user interface' bit where it lets you add stuff to the sidebar) and it would then only appear to logged in users. At the moment I have inserted:
<form role="search" method="get" id="searchform" action="?php bloginfo('url'); ?>"> <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form>
This gives me the normal search form and then i thought i could just customise it so it only searches the user’s own posts. (Maybe something involving the author=%userid%....?)
Does anyone know if it possible to do that by adapting the above code? And if so how how I can do this??
The key thing is that I want both search forms to exist at the same time
(one which searches all the posts, and the second one which just searches the logged in user's posts).
PS: the website is http://www.dreamarchive.org/