• I am using TwentyTwenty theme. In the search results page it shows only the search results texts. I want to show the permalinks of those pages below the search result texts. Which file is to be edited.

    Thanks in advance

    • This topic was modified 5 years, 2 months ago by paramasivan0.
    • This topic was modified 5 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 7 replies - 1 through 7 (of 7 total)
  • In TwentyTwenty Theme, the search result shows not only texts but also posts or pages, right?

    Thread Starter paramasivan0

    (@paramasivan0)

    It shows only texts

    Thread Starter paramasivan0

    (@paramasivan0)

    I created search.php with the following simple code :

    <?php
    /**
    * Template Name: Search Page
    */
    ?>
    <?php get_header(); ?>

    <main id=”site-content” role=”main”>

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <div class=”container” style=”font-size: 17px;”>
    <div class=”row”>
    <div class=”col-md-12″>

    <div class=”search-post-excerpt”><?php the_excerpt(); ?></div>
    <div class=”search-post-link” style=”margin-bottom: 10px;”>“><?php the_permalink(); ?></div>
    <hr>
    </div>
    </div>
    </div>
    <?php endwhile; ?>

    <?php get_footer();

    I use Twenty TwentyVersion: 1.1.
    And I don’t use search.php.

    Thread Starter paramasivan0

    (@paramasivan0)

    Version 1.1 also doesn’t include the url of the search result page.

    like this?

    
    <?php
    /**
    * Template Name: Search Page
    */
    ?>
    <?php get_header(); ?>
    
    <main id="site-content" role="main">
    
    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <div class="container" style="font-size: 17px;">
    <div class="row">
    <div class="col-md-12″>
    
    <div class="search-post-excerpt"><?php the_excerpt(); ?></div>
    <div class="search-post-link" style="margin-bottom: 10px;">
    <a href="<?php the_permalink(); ?>"><?php the_permalink(); ?></a>
    </div>
    
    <hr>
    </div>
    </div>
    </div>
    <?php endwhile; ?>
    
    <?php get_footer(); ?>
    
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    • This reply was modified 5 years, 2 months ago by hotchaillc.
    Thread Starter paramasivan0

    (@paramasivan0)

    Yes, exactly the same.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TwentyTwenty Theme Search Results page’ is closed to new replies.