• I’m using the Andrina Lite theme. When I search for ‘furnace’ in the search widget, the results for blog posts appears correctly. However, any matching content from Pages have several problems.

    1 – The ‘Read More’ button as defined in .content-bar .post .read_more of the style.css file is not applied correctly to results from pages. The ‘Read More’ text appears over to the left without the button.
    2 – Search results from pages include Post Date, Category, Author and ‘Comments Off’ in a different format than post results. This data should not appear at all since pages are not associated with category and the other information is irrelevant.

    See the following URL:

    Thank you for your assistance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • the template for the search results, search.php, is using the general loop.php which is not distinguishing between posts and pages in the result;

    try to edit the style.css to fix the appearance of the search results:

    examples:
    1 – the ‘read more’ is formatted with a style including the .post css class which is missing a pages because the theme is using post_class() for the post div;
    edit the style:

    .content-bar .post .read_more
    { ...

    and change to:

    .content-bar .post .read_more, .search .content-bar .page .read_more
    { ...

    2 – the section with ‘Category etc’ is output without consideration for pages;
    to hide the section, add this to style.css:

    .search .page .post_meta { display: none; }

    also change:

    .content-bar .post { ...

    to:

    .content-bar .post, .search .content-bar .page { ...

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    Thank you very much for your prompt response.

    I made all the code changes suggested above in the style.css file.

    For some reason, it did not change the behavior at all.

    What should I try now?

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    Below are excerpts from the page.php and single.php files. Do you see any problem with the code below?

    From page.php

    <div class="content-bar">
                <?php if (have_posts()) : the_post(); ?>
                    <?php the_content(); ?>
                    <?php wp_link_pages(array('before' => '<div class="clear"></div><div class="page-link"><span>' . __('Pages:', 'andrina-lite') . '</span>', 'after' => '</div>')); ?>
                <?php endif; ?>

    From single.php

    <div class="content-bar">
                <!-- Start the Loop. -->
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                        <!--post Start-->
                        <div class="post">
                            <h1 class="post_title"><a>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'andrina-lite' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h1>
                            <ul class="post_meta">
                                <li class="post_date"><?php the_date(); ?>
                                <li class="post_category"><span>/  <?php _e('Category','andrina-lite'); ?></span> <?php the_category(', '); ?>
                                <li class="posted_by"><span>/  </span><?php _e('Posted By','andrina-lite'); ?> <?php the_author_posts_link(); ?>
                                <li class="postc_comment"><span>/  </span> <?php comments_popup_link(__('No Comments.','andrina-lite'), __('1 Comment.','andrina-lite'), __('% Comments.','andrina-lite')); ?>
    
                            <div class="post_content">  <?php the_content(); ?>

    page.php and single.php are fine, there was never a problem with those templates;
    if at all, search.php would be the template to investigate.

    however, I can see that the changes have taken effect (Firefox 17) –

    don’t forget to clear the browser cache – press ‘ctrl f5’ or ‘reload’ or whatever your broser needs.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    Thank you so much for your help. That is exactly what happened.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    They just fixed this problem with the version 2.5.3. Yeah! Thanks so much for providing me a fix in the meantime.

    Thread Starter SandyMcDonald

    (@sandymcdonald)

    I am very disappointed to say that InkThemes DID NOT fix this problem with the 2.5.3 release. I must have tested before clearing my cache 🙁

    I have reimplemented the code solution above. I do have a question about best practices. Out of the 3 changes above, I am able to put the following in the custom css,

    .search .page .post_meta { display: none; }

    but made the other 2 changes directly in the style.css, which will be overwritten with the next theme update. What is the best option?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Andrina Lite – Read More Button Not Displaying for Pages in Search Results Page’ is closed to new replies.