Before you ask please READ THIS

Hide pages from search page

in Rife Posts: 126
Hi again !

I would like to custom the list of pages on the search result page. It displays all pages, and I would like to hide some of them.

Also, if that is possible, I would like to remove categories also on this search page, and replace it by my articles.

Is that possible ?

Thank you !

Comments

  • AirAir
    Posts: 10,814
    Hello:-)

    I believe that this is possible with some plugins. Maybe this https://wordpress.org/plugins/search-exclude/ ?

    With kind regards.
  • No, it's not that I want to hide pages in the results, but your theme is showing something under: "didn't find what you are looking for, maybe you will find it here" (or something like that, I translated it). And there are lists of pages, and categories.

    If it's too complicated, just tell me which php file I should modify to delete everything.

    Thanks :)
  • AirAir
    Posts: 10,814
    OK, you mean empty search results.
    Sure, go to: loop.php and remove line ~29 get_template_part( 'no-content');

    We probably should change this page in future to give some more useful info :-)

    With kind regards.
  • Posts: 126
    It works like a charm. Thank you ! :)

    I just have a small problem with search bar : I cannot translate it : "Search..." I have created a french .po file and I could translate everything, but this stays, and I don't know where to go now.

    Thanks !
  • AirAir
    Posts: 10,814
    When you translate .pot file search for string Search … - it is what you want to translate :-)

    With kind regards.
  • Posts: 126
    Unfortunately, String locator never works when I search in RIFE, it indicates "The above error was returned by your server, for more details please consult your servers error logs."
  • AirAir
    Posts: 10,814
    I don't know what is "string locator" but you said you created french .po file, so your probably created it from our .pot file, right?

    Now if you will add translation for string I gave you, you will get what you need :-)

    With kind regards.
  • AirAir
    Posts: 10,814
    You can use for this poedit like explained in docs:
    http://apollo13.eu/docs/rife/#!/translating_themeimage
    search_poedit.png
    1110 x 863 - 21K
  • Posts: 126
    Ok, it was a misunderstanding, I thought you were giving me the term to search in php file because I couldn't make it work in poedit. I have a plugin called string locator to locate any term in any file type stored on my ftp.

    I allready found it in the Po file, but despite I translated it, it still remains (like I told you, I could translate everything, but this).

    See the attachment.
    search.PNG
    179 x 219 - 2K
  • AirAir
    Posts: 10,814
    Thanks for explanation, I will take a look at this plugin :-)

    I have just checked and I translated it without a problem.

    Maybe you have some plugin that blocks it. If you like I can take a look, but I will need FTP access. Send it by Private message if you are interested.

    With kind regards.
  • Posts: 126
    Possibly. I send you a pm.
  • AirAir
    Posts: 10,814
    Thanks for data.

    Issue was simple - after you updated .po file, you have uploaded only it, without new version of .mo file. That is why you couldn't see new translated texts.

    So next time upload both .mo and .po files:-)

    With kind regards.
  • Posts: 126
    Ok...I am a little surprised, cause everything has been well translated but this one...Weird. I might have done it wrong. Thank you very much for your help !
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!