• Resolved webengin

    (@webengin)


    Hi,

    We are using salient theme for our website, theme was smooth and fine, but when used with WP ADVERTS ?plugin the css of theme is getting override by the plugins theme and making the front-end output worst and disabling few features like drop down selector and text areas etc mainly this issue occurring when forms used with salient theme. This plugins were performing well with other themes.

    For WP ADVERTS plugin
    ? The text is overriding with the field label.
    ? Drop-down selector is not working?.
    ? ?Extra borders that makes page look worse.

    ?We are happy with WP Advert and we want to develop website with WP Adverts Plugin, so please help us to fix this problem.

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    can you paste a link to a page where you are having this issue? Without looking at the page source i cannot help much i am afraid.

    Thread Starter webengin

    (@webengin)

    Hi,

    Thank you for responding, and here is the link to the page where we are facing issues using WP ADVERTS plugin in our website.

    https://www.australiatradies.com.au/adverts/add/

    Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, thanks it looks like there is a conflict between the theme and WPAdverts, due to how your theme is modifying the inputs using JavaScript the only way to have [adverts_add] displayed properly on your page is to display it in a stacked mode, that is with fields displayed below labels instead of next to them.

    You can do that by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "set_adverts_add_stacked_layout" );
    function set_adverts_add_stacked_layout( $form ) {
      if( $form["name"] == "advert" ) {
        $form["layout"] = "stacked";
      }
      return $form;
    }
    
    Thread Starter webengin

    (@webengin)

    Hi,

    Thank you for the solution and quick response. The code worked to fix only overlapping and extra borders in the page, but there is a drop down field in form called Category it is still not working showing blank in the drop down menu instead of category items in list. Please help us to fix this issue, this is the main problem we are experiencing with plugin.

    https://www.australiatradies.com.au/adverts/add/

    Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, it seems the WPAdverts category multiselect input conflicts with the theme as well, you should be able to workaround it by switching to single-select field, you can do that by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "single_select_advert_catgory" );
    function single_select_advert_category( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == "advert_category" ) {
            $form["field"][$key]["max_choices"] = 1;
            $form["field"][$key]["validator"] = array();
            $form["field"][$key]["validator"][] = array( 
                "name" => "max_choices",
                "params" => array( "max_choices" => 1 )
            );
        }
      }
      return $form;
    }
    
    Thread Starter webengin

    (@webengin)

    Hi,

    Thanks for the solution, but unfortunately code you gave didn’t worked in correct way but made the page broken not only that page but showed effect on all other pages too, can you please fix the code to work perfectly as expected.

    https://www.australiatradies.com.au/adverts/add/

    Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, there is a typo in the first line, try changing

    
    add_filter( "adverts_form_load", "single_select_advert_catgory" );
    

    to

    
    add_filter( "adverts_form_load", "single_select_advert_category" );
    

    if this will not work for you then you can open wp-config.php file add there a line define("WP_DEBUG", true); and refresh the page it should show some error message which you can copy and paste here.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘CSS override issues with salient theme in WP Adverts Add’ is closed to new replies.