• Resolved Chirag

    (@cbsejpal)


    I need ‘Related Posts’ only on Posts and not on other category pages.
    I’m using ELI’s Related Posts Plugin and I can’t find any option to remove ‘Related Posts’ from Category Pages.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi. If there is no option to remove them, you might be able to hide them using CSS. However, I would need a link to your site to tell you exactly what code you need.

    Thread Starter Chirag

    (@cbsejpal)

    Well I am yet to finish with my blog so it isn’t live for now.

    Thread Starter Chirag

    (@cbsejpal)

    For now I have hosted it for free.
    Check it out
    http://higheredublog.onlinewebshop.net/

    The best way to do this would be to call the plugin through a content filter in your functions.php (using conditional tags) or a shortcode function in your single.php file.
    Filter:

    function eli_related_posts($content) {
        if ( is_single() ) {
            $related = related-posts-call();
            $content .= $related;
        }
        return $content;
    }
    add_filter('the_content', 'eli_related_posts');

    Single.php:

    echo do_shortcode('[eli_related_posts_shortcode]');

    However, I don’t see any indications about that in the plugin info, but you could ask the author.
    If none of the solutions above are possible, there’s always the css way:

    .category .SPOSTARBUST-Related-Posts,
    .archive .SPOSTARBUST-Related-Posts {
        display:none;
    }

    Thread Starter Chirag

    (@cbsejpal)

    Hey Thank you “Related Posts” is no longer on category pages πŸ™‚
    But now it is giving me an error on posts page

    Fatal error: Call to undefined function call() in /srv/disk1/1183879/www/higheredublog.onlinewebshop.net/wp-content/themes/the-bootstrap/functions.php on line 129

    Thread Starter Chirag

    (@cbsejpal)

    Well first of all I tried using CSS but it isn’t working.

    If you want Related Posts to appear in pages as well, you would have to expand your conditional checks to this:

    if ( is_single() || is_page() ) {
        // do smth
    }

    As for the CSS, it works fine on this JSFiddle I made. I put your entire GRE category page source in the HTML panel and the CSS rule I recommended in the CSS panel and it worked.
    you could also try this to force it not to display:

    .category .SPOSTARBUST-Related-Posts,
    .archive .SPOSTARBUST-Related-Posts {
        display:none!important;
    }

    Thread Starter Chirag

    (@cbsejpal)

    “important” worked
    Thanks alot πŸ™‚

    Glad it did. I just realized I forgot to paste the link to the actual JSFiddle, haahha. Oh well…
    Take care,

    Marv

    Edit: Oh, BTW, you have a top margin applied to your submenus which sometimes makes the submenu disappear before you can click on any sub-items. My suggestion would be to look for the dropdown-menu selector on l.763 of the bootstrap.min.css file, and change the margin property from:

    margin:2px 0 0;

    to:

    margin:0;

    Thread Starter Chirag

    (@cbsejpal)

    Ah I didn’t notice that.
    Thanks once again πŸ™‚

    Best Regards,
    Chirag

    Thread Starter Chirag

    (@cbsejpal)

    BTW Marv any other suggestions to improve the blog?

    No problem.
    Nothing seems to come to mind right now since everything looks quite right.
    Perhaps something you might consider is expanding WP search capabilities, especially if you are going to have lots of information on your site. A plugin such as Relevanssi would definitely come in handy. It’s a little hard to figure out at first, but once you get a hang of it, it’s really useful.
    If anything else comes to mind I’ll let you know.

    Thread Starter Chirag

    (@cbsejpal)

    Thanks alot πŸ™‚

    Marventus i am unable to contact you via the comfy theme thread so only i am posting it here. I need one urgent help from you. I saw you have given some solutions to afgans website issues. I had issues with uploading featured images in COMFY V 3.1 Theme but i resolved it yesterday some how. Now I am only left with this Video functionality issue. Even though I am working on this theme in my local system but my laptop is connected to internet so the youtube videos links has to work but i dont know why it is not working. I want to know what procedure you followed to load the video in the small framebox the way afgans website is showing. Please help me as i am not getting support from Deluxe Themes.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @newscookies This theme is resolved already, please create your own topic instead.

    http://wordpress.org/support/forum/how-to-and-troubleshooting#postform

    Also? That’s not a theme that is supported here please contact them for support.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to remove 'Related Posts' on Category Pages?’ is closed to new replies.