Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
dchavez

how to hide blog posts from searchable site

Question

Site URL: https://www.gypset.com/

Hi,

I made my site searchable but I want to hide a blog page with lots of posts that are used to feed information to some pop ups on a map www.gypset.com/atlas  since the information is on the excerpts when you type a location on the search bar the blog post appears empty. I would like to find a way to just hide those from the search functionality on the site. I know it can be done with css but not sure how to. Hope I make sense!

 

Screen Shot 2020-09-16 at 8.57.56 PM.png

Edited by danielachavez

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

Go to Blog Settings > SEO and at the bottom of the dialog there are three options for hiding information from search engines? Is that what you are looking for?

1928363226_ScreenShot2020-09-16at10_53_51PM.png.a816b7bcf43714d5cb7a56ae3e048b6f.png

Let us know how it goes.


Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Share this post


Link to post
  • 0
13 hours ago, creedon said:

Go to Blog Settings > SEO and at the bottom of the dialog there are three options for hiding information from search engines? Is that what you are looking for?

1928363226_ScreenShot2020-09-16at10_53_51PM.png.a816b7bcf43714d5cb7a56ae3e048b6f.png

Let us know how it goes.

Hi, Thank for this but, I want to hide the pages from the search results within the website itself. (I already hid the pages from search results on seo) Do you know any way to do it? @creedon

Share this post


Link to post
  • 0

Ah. Can you give us a search phrase we can use to test on your site to see the issue you are seeing?


Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Share this post


Link to post
  • 0

Hi, for example you can search for the word Lamu and when you click the first result you will see that the post appears empty, it was built that way because those posts are feeding the info on the pop up windows here www.gypset.com/atlas we added the search feature way after this was built and I just want to hide those empty posts form the search results on the site. @creedon

Share this post


Link to post
  • 0

Add the following to Custom CSS.

.search-results

  /* corumbau */ [itemid="5e6179d6f042ba7f2e97e878"],
  /* esalen   */ [itemid="5e617a32f11f6b3cb96f5997"],
  /* lamu     */ [itemid="5e6173c14c8fbf134de4a15d"]
  
    {
    
      display: none;
      
      }

This is just some starter CSS you will need to add an entry for each Atlas Map Locations post. For each post you need to get the itemid. View source for each page and look for '<body id="item-'.

953361425_ScreenShot2020-09-23at3_45_58PM.png.327f5cefda7ba9953018a1007be0677f.png

Be sure that each CSS entry is followed by a comma except the last one.

Let us know how it goes.


Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Share this post


Link to post
  • 0

Here is a little something that might make the process a little easier.

javascript: 

  var itemId = document.querySelector ( 'body' ).getAttribute ( 'id' ).replace ( 'item-', '' );
  
  var title = document.getElementsByClassName ( 'entry-title' ) [ 0 ].textContent;
  
  var s = '/* ' + title + ' */ [itemid="' + itemId + '"],';
  
  alert ( s );

First you need to be on a Atlas Map Locations post page. There are two ways you can use the above. You can type it into the address bar and then hit return. Before you hit return make sure the "javascript: " is at the beginning of the code. Some browsers strip that part out as a safety step upon pasting.

If you know how to create a bookmark in your browser you can throw the code in there creating what is called a Bookmarklet. The code then can be triggered by selecting the bookmark.

182115950_ScreenShot2020-09-23at6_20_14PM.png.1ff6ebca4985f06b823b7bb71a9d612c.png

The code throws up an alert with the title and item id.

559196350_ScreenShot2020-09-23at6_32_41PM.png.17c7bcfd45fb1cbfb04dcc0c4ccfd75e.png

You can then copy and paste the dialog content into your CSS.

The above code was thrown together quickly only for this site and to help with the above issue.


Hello I'm Thomas. I've been getting websites up and running for 26 years. I want to help you at whatever level meets your needs, from as little (if you're a DIYer) to as much as you need.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...