• Resolved valgee

    (@valgee)


    I’m using MH Magazine Lite. Great theme, thanks! I’ve tried various ways to remove the author name and date from search results and nothing seems to work. I can remove it from posts but not the search results. Here’s what I’ve tried adding to custom css:

    .entry-meta .meta-sep, .entry-meta .author {
    display: none;
    }

    .search-results .post-meta .post-date,
    .search-results .post-meta .date-sep,
    .search-results .post-meta a:last-child {
    display: none;
    }

    body.search-results .post .entry-meta {
    display: none;
    }

    Any other ways of doing it or am I doing something wrong?

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi valgee,

    thanks for using MH Magazine lite and we’re happy that you like the theme.

    To remove the author name from the search results, you could add this line of CSS:

    .search-results .mh-meta-author { display: none; }

    In general you can always use tools like Firebug or your browsers inspection tool to inspect the elements on your site and then add your own CSS code based on your personal requirements.

    In order to add custom CSS code, you should either make use of a child theme or use plugins like Simple Custom CSS, otherwise your changes will be lost after theme updates.

    Thread Starter valgee

    (@valgee)

    Thanks so much, that worked!
    I’m using a child theme so my changes should remain.

    Thanks again.

    Val

    Thread Starter valgee

    (@valgee)

    One more thing related to the search results. It’s showing an excerpt for password protected pages. My understanding is that by default it’s not supposed to, so I don’t know why it’s showing.
    The code inspector shows:

    <article class=”mh-loop-item clearfix post-25 page type-page status-publish post-password-protected hentry”>
    <div class=”mh-loop-thumb”></div>
    <div class=”mh-loop-content clearfix”>
    <header class=”mh-loop-header”>
    <h3 class=”entry-title mh-loop-title”>
    Protected: Board of Directors with Email
    </h3>
    <div class=”mh-meta mh-loop-meta”>
    </div>
    </header>
    <div class=”mh-excerpt”>
    <div class'”mh-excertp”>
    <p></p>
    </div>
    </div>
    ::after
    </div>
    ::after
    </article>

    I want to list the protected page in search results, just not the excerpts. Is there a way to do this?

    Thanks.

    To hide excerpts for password protected posts, you could do for example:

    .post-password-protected .mh-excerpt { display: none; }

    Thread Starter valgee

    (@valgee)

    Great, that worked! Thanks so much for your excellent support.

    You’re very welcome! If you like the theme and support, then it would be nice if you could leave a short review here. Have a great weekend.

    Hello please i also want to remove the number of comments in my excerpt

    @tarrm: Please don’t post in threads of other users, but instead open your own thread and provide the necessary details regarding your question: Create a new topic.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Remove author name from search results’ is closed to new replies.