Displaying all sites by default, shortcodes, or maybe an API?

I just want to start off by saying I've been trying to search for other topics like this one, but the WPMU search feature seems to be broken. It doesn't matter what terms I search for, the same two results always come up. So my apologies if this has been answered elsewhere!

Onwards to my scenario>>
I'm building out a multisite network where users can sign up and host their comics. To make it easier to find certain comics through the network, I've implemented the SITE CATEGORIES plugin to define GENEREs for the comics.

Problem is, what I want to do is have a complete list of ALL the comic sites displayed by default, but the page SITE CATEGORIES generates is a grid of each category, not their contents. Assuming that SITE CATEGORIES doesn't actually do this, I tried implementing the plugin BLOG DIRECTORY to work alongside it... which does list all the comics on the network by date updated, BUT doesn't integrate with SITE CATEGORIES. Since they both do essentially the same thing, I'd rather just stick with SITE CATEGORIES and not use BLOG DIRECTORY AT ALL.

Ideally, I want to be able to have a page that lists all comics by date updated, and then allows users to filter those comics based on their genres Quicksand style (well, ok, it doesn't have to be quicksand, but I would like to not have it function like a newspaper classified section if at all possible).

Which finally brings me to my question>>
Are there shortcodes or a list of calls I can use to create a more custom implementation of SITE CATEGORIES on my website? If so, where can I find this list? Or do I have to dig through the PHP file?
I know I could probably do something like this:

// Call site categories in theme
if (function_exists('site_categories_function')) {

...in order to build my filter, but I don't have any idea about how to display all the sites without using BLOG DIRECTORY.

Any insight you could give me would be very helpful! Thanks in advance! :slight_smile:

  • Ivan Shulev

    Hey Chloe ,

    I hope you are having a nice day so far!

    I'm afraid your question will require some further digging and I will have to call our SLS support team (coding experts).

    I did look for a shortcode, but there are none implemented in this plugin, unfortunately. I also looked for an appropriate filter, but was not able to find what you need.

    Either me or someone else will post an update here.

    Please keep in mind that the response might take a bit longer.

    Thank you for your understanding and I wish you an awesome day ahead!


  • Chloe

    Ok! Thanks for your help thus far. :slight_smile:

    In the meantime I've been experimenting with my buddypress installation, and it has a SITES listing ability(which seems to work more or less like BLOG DIRECTORY), so I've put the SITE CATEGORIES widget in a sidebar on that page. It'll do for now, but if you find anything please let me know! http://www.arcrisecomics.com/browse

    Thanks! :smiley:

  • Chloe

    While I still think this would make for a nice feature for the plugins, for now I've decided to just make a custom post type on my root site and create a new post for each comic manually. Then I can add categories (genres) and tags and still have my quicksand filter.

    This way if/when the plugins function in a little bit more manageable way, I can just upgrade my manual system. :slight_smile: I'm going to mark this post as resolved in the meantime.

    Thanks again!

  • Chloe

    I'd like to re-open this thread and see if there is a way to customize the site categories output a bit more. (I've just finished my site's alpha testing, and my manual solution I mentioned previously isn't gonna work) Basically, all I really *need* to do, is list all of the sites underneath their respective categories on the main landing page. The structure would be something like this:

    Cat 01
    --site A
    --site C
    --site F

    Cat 02
    --site B
    --site E

    Cat 03
    --site D

    Essentially, I'd like to take the output from each individual Genre's landing page and put it on the category page that lists all the genres. I'm going to do a little more digging in the plugin to see if I can't find a way to do this on my own, but regardless of whether I figure it out or someone else does, I'd like to have the solution publicly listed here for other people. :slight_smile:

    Thank you for your help!

  • Panos

    Hello Chloe ,

    Hope you're doing well :slight_smile:

    Could you please provide further information about what it is you need to display and which is the page you need to display it?

    Not sure if I understood correct, are you talking about the page of a specific Site Category which will list all sites of that category?

    If this is the case you can use the site_categories_landing_list_sites_display action hook, like:

    add_action( 'site_categories_landing_list_sites_display', 'wpmudev_list_categories_in_sites_list', 98, 3 );
    function wpmudev_list_categories_in_sites_list( $content, $data, $args ){
        $additional_content = "Some result";
        $content = $additional_content . $content;
        return $content;

    It would be helpful if you let us know the url of the page you need to display the additional information :slight_smile:


  • Chloe

    Hi Panos!

    So what I'm looking to do is treat this multisite installation like a (literal) library of books. So think of my BROWSE page as a bookshelf, and each site in the multisite installation as a book. Basically, rather than just seeing the top level categories when I look at the BROWSE page, I want to see each site organized by genre. I don't just want to see a single genre, I want to see all the sites in all the genres on the same page.

    So to compare heirarchys, the current default structure looks like this:
    Category >(new page) list of sites

    And what I'd like is something like:
    List of sites (list categories in site description)

    I guess I'm trying to treat the SITE CATEGORIES like they would behave if sites were like blog posts, and the site categories were like blog post categories... does that make a little more sense? It's a simple concept, but I'm having a hard time articulating it because it's so simple. XD

    Ideally it'd be nice to be able to search for sites by category since I think it's more effective than starting at a top level category and scrolling through... especially when sites have multiple categories as is often the case. I know this is possible, I'm just trying to figure out which hooks to use for what and such.

    The URL for the page I'm working on right now is http://arcrisecomics.com/browse . http://arcrisecomics.com/comic-directory also does something similar, but it's using buddypress' site directory functionality instead of the site-categories.


  • Panos

    Hey Chloe ,

    Thanks for the explanation :slight_smile:

    Of what I understand you need to display the sites list of each category right directly in the categories list page? Unfortunately there is no hook for this I'm afraid so you'll need to edit plugin's files.

    It's not that hard to be done, first choose which template you want to use for your site categories list. Depending on your selection you'll have to edit a different file. For example if you choose "Accordion", then you will need to edit file wp-content/plugins/site-categories/lib/display_templates/display_accordion_categories.php

    In the same folder you will see the rest of the files that are being used for other layouts.

    Continuing in the same file in my example you can add the following snipped at line ~110:

    $site_categories_obj = new SiteCategories;
    			$sites = $site_categories_obj->get_taxonomy_sites($category->term_id);
    			if( is_array( $sites ) && !empty( $sites ) ){
    				$content .= '<ul class="sites-wrap site-cat-'.$category->term_id.'">';
    					foreach( $sites as $site_title => $site_meta ){
    						$content .= '<li class="site-item">';
    							$content .= '<a class="site-link" href="'. $site_meta->siteurl .'">'. __( $site_title ) .'</a>';
    						$content .= '</li>';
    				$content .= '</ul>';

    Please let me of which layout you prefer to choose so I can send you the file attached :slight_smile:

    In case I have understood something wrong here please let me know :slight_smile:


  • Chloe

    Hmm I tried this in the grid template at line 110 and nothing happened. There should be one site showing up under fantasy, horror, and romance.

    So to go off track a little bit, I just remembered that I do actually have a wireframe of what I'm attempting to get to (and I understand I won't get there immediately and a lot of this is custom coding that I'll get to later). I thought it might be helpful in understanding what I'm trying to accomplish and what I need to know about the site categories plugin in order to achieve.

    I've crossed out the stuff to ignore, and re-labeled in red the important pieces so you can see my thought process as well.

    The site avatar I'm hoping to accomplish with the AVATARS plugin, and the site title, author and description are built into the SITE CATEGORIES plugin. What I'd like to do is have a stacked list (like in the wireframe) of each site with the site's categories listed within the site's ul/grid/block. I can figure out a way to sort them (with an advanced search feature or something similar) later when I have enough to sort.

    As I'm talking through this with you, I'm wondering if it's possible to just create a new categories landing page template instead of modifying an existing one. I might try hacking a template together this week.

    I hope I'm making things clearer rather than over-complicating things! T^T

    Thank you so much for helping me thus far!

  • Panos

    Hi Chloe ,

    I just found out that at the very end of the template file there is an actual filter hook! We can take advantage of that :slight_smile:

    I have prepared a custom plugin for you to use which you can modify as you like! I have it attached here. Download it and install it as any other plugin, only that it requires Site Categories plugin to be also installed and active.

    This custom plugin overrides the default grid layout with a new layout that contains the sites list of the categories. It will require some custom css so the sites get in appropriate position. As you understand this will only work if you have chosen the grid layout.

    Please let me know how this works for you or if you need any help regarding the css part :slight_smile:


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.