Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro How to have 2 search forms using the same post types?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Adrian DeGus
    #162263

    I would like to use the same form in two places on my website, vertically in the sidebar on some pages and horizontally on one particular page. I need both forms to use the same post type archive display mode but I get an error when I try to do this.

    Is there any way around this? Perhaps I can assign an ID or something on the form that needs to be displayed horizontally, so that I’m only using the one form?

    The vertical forms will be displayed using a widget and the horizontal form with a shortcode.

    Trevor Moderator
    #162284

    The only way is to use one form and style it differently with custom css pertaining to the page it is on. The Body class tags are often different between pages, enabling you to do this.

    Adrian DeGus
    #162290

    Ok, I just confirmed that my body class tags are different, so I will give it a try.

    Can you tell me where the body class might go into this code snippet?

    .searchandfilter[data-sf-form-id="###"]  > ul > li {
    display: inline-block;
    margin-right: 20px;
    }
    .searchandfilter > ul > li:last-child {
    margin-right: 0;
    }
    Trevor Moderator
    #162292

    Like this:

    body.mybodytag .searchandfilter[data-sf-form-id="###"]  > ul > li {
    display: inline-block;
    margin-right: 20px;
    }
    body.mybodytag .searchandfilter > ul > li:last-child {
    margin-right: 0;
    }
    Adrian DeGus
    #162294

    Ok thanks, I’ll give this a try.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.