Skip Navigation

[Resolved] Ad custom search to author page

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to add custom search to author page
Solution:
To create author archive with custom search option you need to set the archive purpose to "Display the archive as custom search" and you will see the Filter editor available with your archive.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/ad-custom-search-to-author-page/#post-618298

Relevant Documentation:
https://toolset.com/2016/11/custom-searches-in-archives-in-reference-sites/

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Author
Posts
#617916

Hi.

My "author" pages currently look like this: hidden link

Aside from the info at the top posts belonging to the author are also displayed.

What I want to try and accomplish is to create a custom search with 2 fields, keyword, and a category drop-down. the search will be displayed on the author's page.

Is it possible to create a custom search that will only search the listing of that specific author's posts?

#618116

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you should build your author archive with custom search and add your required filters to it's filter section.

More info:
=> https://toolset.com/2016/11/custom-searches-in-archives-in-reference-sites/
=> https://toolset.com/documentation/user-guides/normal-vs-archive-views/#2-customize-pagination-and-add-custom-search

#618267

Hi Minesh,

I added the custom search code to the loop output editor of the author archive page as well as the query filter section.

Here is the code I used:

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div id="filter-form-wrapper" class="filter-box">
  <div class="col-sm-12">
    <div class="row">
      <div class="col-sm-3">
        [wpv-filter-search-box output="bootstrap" placeholder="Keyword"]
      </div>
      <div class="col-sm-3">
        [wpv-control-post-taxonomy hide_empty="true" taxonomy="item-condition" type="select" default_label="Any condition" url_param="wpv-item-condition"]
      </div>
      <div class="col-sm-3">
     [wpv-control-post-taxonomy hide_empty="true" taxonomy="listing_cat" type="select" default_label="All categories" url_param="wpv-listing_cat"]
      </div>
      <div class="col-sm-3 text-center">
          [wpv-filter-submit name="Search" output="bootstrap"]
      </div>
    </div>
  </div>
</div>
[/wpv-filter-controls]
[wpv-filter-end]

I am having some unexpected results though. When I click on a drop-down item the search duplicates and none of the search fields work.

See here: hidden link

Where did I go wrong?

#618274

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - did you created author's archive from: Toolset => WordPress archives?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#618298

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you need to set the correct archive purpose - please check following screenshot:
=> hidden link

I've set the archive purpose to "Display the archive as custom search" and now you will see the Filter editor available with your archive. You should remove all filters from your loop output editor and add it to Filter editor and it should work.

#618921
Screen Shot 2018-02-23 at 10.18.56.png
Screen Shot 2018-02-23 at 10.19.58.png

Hi Minesh,

Thanks very much, I understand how to build the search now.
But, something weird happens when I add the query filters.

Normally the page displays a logo and custom fields, see screenshot: Screen Shot 2018-02-23 at 10.19.58.png

As soon as I add the query fields that information disappears, see screenshot: Screen Shot 2018-02-23 at 10.18.56.png

To get those fields at the top to work also took some doing, you can see that thread here: https://toolset.com/forums/topic/need-more-help-with-adding-content-to-author-archive/

#618944

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I'm glad to know that now custom search works for your with author archive and your original issue is resolved.

May I kindly ask you to open a new ticket with your each new question, this will help other users searching on the forum. Thank you for understanding.

You can create a new ticket and assign it to me as well and you can add old ticket link as reference.

#619003

Hi Minesh,

No problem will do.