Visual theme – replace "Nothing Found" for a Category

  • Unknown's avatar

    Hoping someone can help…
    I’ve set up categories for countries but some don’t contain blogs yet. So that someone visiting my site knows there’s more to follow on a country, I would like to keep the empty category but replace the following default text:
    “Nothing Found” to “More to follow”
    “It seems we can’t find what you’re looking for. Perhaps searching can help.” to “Check back soon. Why not search on a different country while you’re waiting…”

    Hope this is possible, many thanks.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    I would suggest publishing a temporary post in the categories that do not yet have posts with a message that posts will be coming. It would be cumbersome to try and hide that and add a message.

    If you do not want to do that, you can give the following CSS a try.

    article.not-found .entry-content {
        display: none;
    }
    article.not-found .entry-header {
        visibility: hidden;
    }
    article.not-found .entry-header:before {
        visibility: visible;
        content: "More to Follow";
        font-size: 120%;
        font-weight: bold;
    }
  • Unknown's avatar

    Hi @thesacredpath, thanks! I tried posting a message in the Category description area but this looked lame as the “Nothing Found”, etc., still displays, so I posted the question on this forum.

    Plugged your above code in and now displays a Shakespearen para, the footer is in the wrong place, and other text – not what I was after really.

    I’ve left the code in so you can see what I mean; check out Cambodia as an example. Maybe I need to just leave it as it is and get a move on with writing loads more! :)

  • Unknown's avatar

    The alignment issues are generally because there isn’t any content on that category page so there is nothing to hold the footer down at the bottom of the page (the entry-content div is collaped). If you look at your Singapore category, that one post gets everything aligned properly.

  • Unknown's avatar

    Thanks for the response. The alignment issue is something very different.
    When I’m in wp-admin/customise.php, the Cambodia page displays the Shakespeare para and everything is overlapping, which is different to when I’m viewing this page via the actual site (displays correctly). Any ideas why?

    *I’ve tried to add a footer using:
    .blog-credits::before {
    content: “©2015 Image Earth Blog | All rights reserved.”;
    padding-right: 60px;

    My question is, can I incorporate the default “Image Earth Blog” text (left-side) with the above content? So, still have the link properties but add the rest of the text around the default text?
    I used 60px padding to separate the text from the WP info, but ideally left-aligned for the copyright info would be great.

  • Unknown's avatar

    Forgot to mention, the footer I added does not display on every page of my site.

  • Unknown's avatar

    On pages that have infinite scroll, such as your main page, category and archive pages, the code you have above is correct, but on static pages, such as your about page, it uses a different footer, so you will need to add the following.

    .site-info:before {
    content: "©2015 Image Earth Blog | All rights reserved.";
    }

    Once in a while, the Customizer page may show things a little differently than the browser does, since it has to be controlled and displayed by the WordPress software so that you can see changes in realtime.

    The “Image Earth Blog” text at the left of the infinite scroll footer can have text added to it with the following:

    #infinite-footer .blog-info a:before {
        content: "© 2015 ";
    }
  • Unknown's avatar

    Thanks for your help! I posted this question on another forum and staff-happychia responded with different code. As both of your independent suggestions didn’t work quite the way I wanted, I’ve combined both codes and have come up with what I was after – a consistent footer displays on static and infinite scroll pages. Although, I still have 2 issues I can’t fix:
    *Can’t make default “Image Earth Blog” text on scrolling pages to display in 11px (tried .infinity-blog-title but that didn’t change the default text)

    *I’d like the static footers to be underlined on hover to be consistent with the WP site info text.

    My footer code so far:

    .site-info {
    text-align: right;
    font-size: 11px;
    }

    .site-info {
    content: “©2015 Image Earth Blog | All rights reserved.”;
    font-size: 11px;
    }

    .site-info a[href=”https://wordpress.com/?ref=footer_blog”]:before {
    content: “©2015 Image Earth Blog | All rights reserved.”;
    float: left;
    }

    #infinite-footer .blog-info a:before {
    content: “© 2015 “;
    font-weight:normal;
    font-size: 11px;
    }

    #infinite-footer .blog-info a:after {
    content: ” | All rights reserved. “;
    font-weight:normal;
    font-size: 11px;
    }

  • Unknown's avatar

    Hi Nilla,

    It looks like you were able to resolve both of the issues listed below. If you still have any outstanding questions, please let me know. Thanks!

    *Can’t make default “Image Earth Blog” text on scrolling pages to display in 11px (tried .infinity-blog-title but that didn’t change the default text)
    *I’d like the static footers to be underlined on hover to be consistent with the WP site info text.

  • Unknown's avatar

    *I’ve decided to remove categories that don’t contain blogs after some research about landing pages.
    *Still haven’t resolved the default “Image Earth Blog” text displaying in bold and larger font that the rest of the footer for scrolling pages. If you could help with this, that would be excellent! :)

  • Unknown's avatar

    It seems that a gremlin has accessed my CSS and changed my old code to some new code but now the Copyright symbol follows the name, which technically isn’t correct.

    New code:
    .site-info {
    text-align: right;
    font-size: 11px;
    }

    .site-info {
    content: “©2015 Image Earth Blog | All rights

    reserved.”;
    font-size: 11px;
    }

    .site-info a[href=”https://wordpress.com/?

    ref=footer_blog”]:before {
    content: “©2015 Image Earth Blog | All rights

    reserved.”;
    float: left;
    font-weight: normal;
    font-size: 11px;
    }

    #infinite-footer .blog-info a {
    float: left;
    font-weight: normal;
    font-size: 12px;
    }

    #infinite-footer .blog-info a:after {
    content: “- ©2015 All rights reserved”;
    font-weight: normal;
    font-size: 12px;
    }

    p.jp-relatedposts-post-context {
    color: #DDD;
    font-size: 13px;
    }

    Old code (correct Copyright placement):
    .site-info {
    text-align: right;
    font-size: 11px;
    }

    .site-info {
    content: “©2015 Image Earth Blog | All rights reserved.”;
    font-size: 11px;
    }

    .site-info a[href=”https://wordpress.com/?ref=footer_blog”]:before {
    content: “©2015 Image Earth Blog | All rights reserved.”;
    float: left;
    }

    #infinite-footer .blog-info a:before {
    content: “© 2015 “;
    font-weight:normal;
    font-size: 11px;
    }

    #infinite-footer .blog-info a:after {
    content: ” | All rights reserved. “;
    font-weight:normal;
    font-size: 11px;
    }

  • Unknown's avatar

    Hi Nilla,

    If you change the font-size of #infinite-footer .blog-info a from 12px to 11px, the “Image Earth Blog” text will be the same size as the surrounding text.

    It looks like you were able to switch the copyright to be before the text “2015 Image Earth Blog”. Is it where you want it now?

    If you have any other questions, please let us know. Thanks!

  • Unknown's avatar

    Yes, that’s where I want the Copyright, etc. Thanks for your help:)

  • The topic ‘Visual theme – replace "Nothing Found" for a Category’ is closed to new replies.