Shortcodes on Presentation Page

  • Author
    Posts
  • #105624

    Hi
    I have a shortcode for a property search form (Easy Property Listings) in one of the presentation page text areas that does not seem to work – when search is pressed it stays on the homepage rather than going to the search results page?
    Are you able to say whether it is a theme issue or EPL shortcode issue.
    <div id="eplhomesearch" style="margin-left:30%">[listing_search style="wide" post_type="all" search_house_category="off" search_location="off" search_country="on" search_price="on" search_price_global="off" search_bed="on" search_bath="off" search_rooms="off" search_bath="off" search_features="off" search_other="off" submit_label="Search"]</div>
    TIA

    Website: belaviva.com

    #106274
    Zed
    Cryout Creations mastermind

    That depends on the search form markup that’s outputted by the shortcode – specifically the action parameter, which can either be empty (meaning self) or be a specific URL.

    Does the shortcode work as expected inside other pages?


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #107070

    Hi Zed – I tried replying to this thread last week but it’s not appearing – I even tried starting a new thread to highlight it. Now when I try it says duplicate content!

    • This reply was modified 3 years ago by encoreservices. Reason: Additional info
    #106764

    Hi Zed
    Thanks for the pointer.
    1. the shortcode works as expected on other pages e.g. https://belaviva.com/luxury-property/buy-luxury-property/
    2. the generated form code is as follows

    <form method="get" action="https://belaviva.com/">
    <input type="hidden" name="action" value="epl_search" />
    <input type="hidden" class="in-field field-width post_type" name="post_type" id="post_type" value="all" />
    <input type="hidden" class="in-field field-width property_status" name="property_status" id="property_status" value="" />

    So it looks like it’s doing something with the hidden fields, I guess
    Any further pointers?
    TIA

    Website: belaviva.com

    #106768

    Thanks for the feedback, @Zed
    1. the shortcode works as expected on other pages e.g. https://belaviva.com/luxury-property/buy-luxury-property/
    2. the form code generated by the shortcode is as follows
    <form method="get" action="https://belaviva.com/"><input type="hidden" name="action" value="epl_search" /><input type="hidden" class="in-field field-width post_type" name="post_type" id="post_type" value="all" /><input type="hidden" class="in-field field-width property_status" name="property_status" id="property_status" value="" />
    So with the action set to the “homepage”, I’m guessing it’s doing something with the hidden parameters
    Thanks for any further input.

    #107116
    Zed
    Cryout Creations mastermind

    Your replies were saved, but because of containing code they got flagged for manual review.

    The value of the action parameter action="https://belaviva.com/" indicates that the form will always submit to the homepage. This is the same on both embedding locations, and the search form works as intended in both cases (confirmed by the presence of the search form parameters in the URL).

    On standard pages the plugin is able to override the output and display its own content (the search results), however on the homepage it cannot do this as the theme’s own landing page feature takes precedence.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #107224

    Thanks, @Zed – sorry for posting a few times
    I thought it may be that – I will find another solution
    Thanks again for your input

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

The topic ‘Shortcodes on Presentation Page’ is closed to new replies.