Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dan Roberts

    (@drobertsorg)

    That’s an interesting one. Not sure if there’s an elegant solution (even if re-writing the code of the plugin), but here’s a hacky workaround. This will break the plugin for normal operations but allow it to work with a static front page:

    1. Create a new page called “Results” and leave it blank. Make sure the permalink is “results”
    2. Open wp-content/plugins/wp-legisearch/public/functions.php
    3. Replace line 136 with the following:
    $html .= ‘<input type=”hidden” name=”legisearch_base_url” value=”‘ . get_permalink() . ‘/results/’ . ‘” />’;

    If you want to call it something besides Results, just change the ‘/results/’ in step 3 with the correct permalink.

    In the meantime, I’ll try to think of a better long-term solution for the next release.

    Thread Starter Linton Hale

    (@lintonhale)

    That worked! You rock! Thanks very much for your quick reply and detailed solution…

    ??

    ~ Linton

    Plugin Author Dan Roberts

    (@drobertsorg)

    Glad I could help. Thanks for the interesting problem.

    Hi Dan,

    I had a similar problem to Linton, and I tried your solution, but I got a Parse error.

    Parse error: syntax error, unexpected ‘type’ (T_STRING) in /home/pennsy8/public_html/[website-name]/wp-content/plugins/wp-legisearch/public/functions.php on line 136

    Do you know why this might be?

    I figured it out, but now my Google maps is not appearing.

    This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Having trouble using WP Legisearch on static home page’ is closed to new replies.