WordPress.org

Support

Support » How-To and Troubleshooting » Search results page does not show clickable title

Search results page does not show clickable title

  • Hi,

    When a do a search on my site, the search result page only shows the non-clickable content of each page of my site. There are no page title. nothing is clickable.

    By the way, my site contains pages only, there’s no post in case this is important.

    Any idea?

Viewing 6 replies - 1 through 6 (of 6 total)
  • kaseban
    Participant

    @shandizstocks

    hi

    edit your searchform.php file in theme editor

    http://codex.wordpress.org/Function_Reference/get_search_form

    Can I ask you what need to be modified in searchform.php?

    This is the only code there is:

    <form class="art-search" method="get" name="searchform" action="<?php bloginfo('url'); ?>/">
    
    	<input name="s" type="text" value="<?php echo esc_attr(get_search_query()); ?>" />
    
    	<input class="art-search-button" type="submit" value="<?php echo __('Search', THEME_NS); ?>" />
    
    </form>

    Thanks for your time!

    kaseban
    Participant

    @shandizstocks

    ok , that is true.
    if you don`t have search.php or searchpage.php , in page.php post titles should be link to the posts or “read more” link to posts.

    This is what I have in search.php

    <?php
    
    /**
    
     *
    
     * search.php
    
     *
    
     * The search results template. Used when a search is performed.
    
     *
    
     */
    
    get_header();
    
    ?>
    
    			<?php get_sidebar('top'); ?>
    
    			<?php
    
    			if (have_posts()) {
    
    				theme_post_wrapper(
    
    						array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span class="search-query-string">' . get_search_query() . '</span>') . '</h4>'
    
    						)
    
    				);
    
    				/* Display navigation to next/previous pages when applicable */
    
    				if (theme_get_option('theme_top_posts_navigation')) {
    
    					theme_page_navigation();
    
    				}
    
    				/* Start the Loop */
    
    				while (have_posts()) {
    
    					the_post();
    
    					get_template_part('content', 'search');
    
    				}
    
    				/* Display navigation to next/previous pages when applicable */
    
    				if (theme_get_option('theme_bottom_posts_navigation')) {
    
    					theme_page_navigation();
    
    				}
    
    			} else {
    
    				theme_404_content(
    
    						array(
    
    							'error_title' => __('Nothing Found', THEME_NS),
    
    							'error_message' => __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS)
    
    						)
    
    				);
    
    			}
    
    			?>
    
    			<?php get_sidebar('bottom'); ?>
    
    <?php get_footer(); ?>

    I’m not a coder, but I can usally modify the code by myself, but this time I really dont know what to do.

    I dont want to be a pain but if you shandiz, or someone else, could give me a hint on what to do, that would be much appreciated.

    kaseban
    Participant

    @shandizstocks

    If the theme is not custom, you should first create a Child Theme, otherwise any changes made to original theme files will be overwritten once the theme updates.

    i think you should replace this line : (create backup before any change)
    get_template_part(‘content’, ‘search’);

    with this :
    get_template_part(‘content’, get_post_format());

    didn’t work shandiz.

    Thanks anyway.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search results page does not show clickable title’ is closed to new replies.