Network Theme - Hello World & Take first image?

I notice that this theme when pulling network blogs also pulls the first "Hello World" blog, I assume if 2 people signed up the page network theme page could be be flooded with "Hello World".

Is there no way to have those images for the network blogs pull the first image on that blog posts page rather than just relying on featured image (If featured is set then that could take precedence?).

Some of ElegantThemes themes don't play to well with featured images and thus it often is easier for their themes to just take the first image posted on a page for things like slide shows, etc. (Using feature images often breaks their slide shows thus ruins the design).

Thanks :slight_smile:

  • Tammie

    Sounds to me like you want to customise the sql call yourself which you can if you are comfortable with code.

    The file you want to look at is library/functions/custom-functions.php:

    1. multisite_recent_posts() : link 504: for multisite
    2. get_recent_posts() : line 387 for non multisite

    if ($how_long > 0) {
    		$blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE
    			public != '2' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0'
    			AND last_updated >= DATE_SUB(CURRENT_DATE(), INTERVAL $how_long DAY)
    			ORDER BY last_updated DESC LIMIT $how_many");
    	} else {
    		$blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE
    			public != '2' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0'
    			ORDER BY last_updated DESC LIMIT $how_many");
    	}

    In these you can add a AND and maybe say if blog post 1 or something similar.

    We may review this at some point but have no current plans to add into Network so advise this custom edit using the parent and child theme structure.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.