[resolved] Search problem (6 posts)

  1. yakos
    Posted 3 years ago #

    Hello everyone,

    I am having a problem that must be common out there, but I have no idea how to work around it. We created an index.html page as a front page on the WP website and now every time we search for something instead of producing the search results, we are falling back to the index.html page.
    I guess that WP is producing the results but they cannot be accessed because of index.html in the root directory.

    Does anyone know how to get around this issue? Do I need to follow WP docs instructions on how to create a search page? Is this going to resolve my issue?

    thanks in advance

    website: http://mnimes.diasporic.org/

  2. cdukes
    Posted 3 years ago #

    index.html overrides WP's index.php file, which is the initiator for all WP-related processing. You'll need to move your index.html contents to a page template in your theme, set that template for a page, and set that page as your front page.

  3. yakos
    Posted 3 years ago #

    Thank you very much Cooper for your response.
    I guess we did not expect that when we decided to create the html page.

    However, we live and learn. But I need to ask a question please if you can quickly reply.

    In the new page template we need to build, do we just want to place this on top -
    and leave the rest of the HTML page as is with javascript in it included, or do we also need to include these lines -
    <?php get_header(); ?>
    <div id="container">
    <?php ttw_put_ttw_widgetarea('top-widget-area','ttw-top-widget','ttw_hide_widg_posts'); ?>
    <div id="content" role="main">
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-index.php and that will be used instead.
    get_template_part( 'loop', 'index' );
    </div><!-- #content -->
    <?php ttw_put_ttw_widgetarea('bottom-widget-area','ttw-bot-widget','ttw_hide_widg_posts'); ?>
    </div><!-- #container -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    We would like to keep what is in the html page if possible and incorporate it into a single php page template. Would this work?

    Thank you again

  4. cdukes
    Posted 3 years ago #

    You'll have to give your template a name, via a vis: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    Other that that top snippet, the contents can be anything you want. You don't have to tick to your usual layout.

  5. yakos
    Posted 3 years ago #

    Thanks again Cooper

    I have done as codex says, but the javascript doesn't seem to work

    Here's what its doing ( testing on a wp not used ) -

    Here's what I want it to look like -

    Why is it doing that ?

    Thank you again

  6. yakos
    Posted 3 years ago #

    Sorry Cooper,

    I answered my own question. I needed to place full paths on the page for javascripts, in order for the jscripts to be found.


Topic Closed

This topic has been closed to new replies.

About this Topic