searchform.php is still referencing our non-HTTPS URL

Home Forums Spacious Free searchform.php is still referencing our non-HTTPS URL

This topic contains 3 replies, has 2 voices, and was last updated by  Bishal Napit 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1370614

    jameswinterborn
    Participant

    I’ve recently added SSL to our WordPress site that is using Spacious, and its working everywhere except the search form on our FAQ page. In Chrome, we get the error “This page includes a form with a non-secure “action” attribute.” When I go through the source I can see that the search form is still using HTTP.

    I found the seachform.php file and it doesn’t have the URL coded in it, rather just a call to home_url. Both my site address settings in WP have HTTPS. Below is the entry in searchform.php:

    <form action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>” class=”search-form searchform clearfix” method=”get”>

    I can’t see why its still not pulling the HTTPS address as it is everywhere else in the site. I’ve even run a Search and Replace tool to make sure that all HTTP references are changed to HTTPS and restarted services, but the search form is still going to the old HTTP URL. Do ya’ll have any idea how I can get this to use our HTTPS URL? Can I hard code it in to searchform.php? Im not sure how.

    Thanks in advance for your consideration.

    -J

    #1370655

    Bishal Napit
    Moderator

    @jameswinterborn

    Can you search in WordPress plugin directory for the SSL fixer and see if it can help you solve out that issue for your site? Thanks.

    #1370861

    jameswinterborn
    Participant

    Thank you for replying. I have just tried to run the SSL fixer, and another SSL fixer tool, but the issue persists even after a full reboot. I’ve tried every option in the fixers, but no luck. I know exactly where the issue is, but uncertain the fix.

    There is a search form on our FAQ Page that is still pointing to HTTP, for some reason. The form is coming from: var/www/html/wp-content/themes/spacious/serachform.php

    From that form, it is trying to use “home_url”, which is definitely showing correct in the WP setup.

    <form action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>” class=”search-form searchform clearfix” method=”get”>

    Is there any way for me to just hardcode that setting to the actual URL instead of having it pull from home_url? It doesn’t look like anything else i’ve tried is working.

    Thanks again for your help! Talk to you soon!
    John

    #1371032

    Bishal Napit
    Moderator

    @jameswinterborn

    If you want to hardcode the same then, you can create the child theme and then, duplicate the file which you mentioned in the child theme and then, change the code: <?php echo esc_url( home_url( ‘/’ ) ); ?> to the required site link for your site and check once? Thanks.

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

You must be logged in to reply to this topic.