How about an if statement?
<?php
$blogs = get_last_updated(' ', 0, 3);
foreach ($blogs AS $blog) {;
switch_to_blog($blog["blog_id"]);
$lastposts = get_posts('numberposts=1&orderby=date');
foreach($lastposts as $post) : setup_postdata($post);
?>
<?php if $blog["blog_id"] != 1 { ?> // Run the Output if the ID is not X
<div class="col-sm-4 blog-newest">
<!-- blog name -->
<h3><?php echo $blog_title = get_bloginfo( 'name' ); ?></h3>
<!-- Link to blog -->
<a href="https://wordpress.stackexchange.com/questions/251389/<?php echo get_page_link($post->ID); ?>">
<?php echo $post->post_title; ?>
</a>
</div>
<?php
endforeach;
restore_current_blog();
}
?>
<?php } ?>
Related Posts:
- How to set permalink structure via functions.php
- date_i18n() issue
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- How to test for MU via functions.php?
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- How can I disable/hide certain themes in multisite?
- Change the template of multiple multisite pages at the same time
- Is it a bad practice to use switch_to_blog in the frontend?
- Theme Development for WordPress Multisite Installation
- WordPress empty Nav Menu error
- multisite: global menu containing network site links?
- Acivate all themes multisite wide automatically
- Question regarding WP multisite feature
- Featured Image meta box not showing up
- Where do files uploaded via Media Manager get stored in MU?
- How to allow users to create their own website within my domain? [closed]
- Different text on different sites in a multisite setup
- How to make a theme unable to be used on a multisite network?
- Sample Theme Options page for Multisite – what to consider
- Get themes’s images path in WordPress Multisite
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- Converting a theme to a child theme in a network
- HTTP Error when uploading images over specific dimensions
- How to get blog-id of an MU site from functions.php
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- How to get full native language instead of iso?
- How to make menus, footer, sidebars multi language
- Why does the theme of secondary site load the primary one in WordPress Multisite? [closed]
- Let user publish posts on community page
- Can I use WP Multi-site on a sub-domain with a different theme but use all the original site’s posts/pages?
- Mutlisite in wordpress is not working
- background_image support multiple image size?
- How can I demonstrate themes well?
- Theme Options Doesn’t Work On WP Multisite
- Subsite theme mystery man replacement with Buddypress on main site [closed]
- Custom link color or stylesheets
- How to add custom css file in theme?
- CSS not updating in browser when I change it
- Get url of thumbnail from the media uploader
- How to: Update live sites theme from version control repo via plugin or library? [closed]
- Adding items to page template dropdown on Page Edit Screen
- How to use logout function on custom menu link?
- Hide certain pages / posts on wp-admin, show custom filter
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Front End Post Submit Form
- How to add a text widget during theme activation
- WordPress Theme customisation CSS
- Displaying wp menus by name without using theme locations
- Why does this loop only work on the homepage?
- Nesting Functions within Functions
- WordPress language switcher
- How to determine if post has widget content?
- Custom Script Section Only Echoes Text
- Best way to start becoming a wordpress developer
- Set multiple templates per post
- Place the page title into the short code
- Displaying recent post excerpts on static front page
- Which html elements should be styled in wordpress theme
- WordPress Media Uploader in page template (On Front-end)
- Theme Customizer not loading JS for live preview
- Replace function in a child theme
- get_search_form() and aria_label
- Can’t remove DIV from hooks in Storefront child theme [closed]
- Admin: sub menu doesnt display under apperance when activate my themes
- How to register and enqueue JavaScript files without breaking plugin dependencies?
- How can I specify that an area of my theme contains widgets?
- How to dequeue css files?
- Extract all shortcode data from post into loop variables?
- wp_nav_menu and its fallback
- Adding the_content() return warning count()
- Copying the theme style files and images to duplicate the website but with a difference
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Ajax call returns 0 when add_action is inside a class in functions.php
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- iPad WordPress theme?
- Custom Post Types set up, how do I style the main slug page?
- What are the permalinks options for “Category” base and removing it?
- Designing a custom archive.php inspired by the Autofocus theme
- Is a site with 1,500 pages, (1000 of which are E-Commerce Pages) Too Big to Migrate to WordPress?
- Make theme settings support multisite enabled (WordPress Mu) site
- WordPress theme doesn’t read my translations from pt_BR.po file
- Move the social media icons to the left of a WordPress nav menu for Soledad child Theme
- Two instances of the theme folder in the URL
- Customizer API way function is_customize_preview() works only in main page?
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- unable to display the image meta value as background
- editor style css and page template with and without sidebar
- 3 x 3 grid of posts on the home page
- How to update my own theme?
- trying to figure out how to use more that one image upload in the same section in theme customizer
- WordPress custom jquery not found
- The normal loop with different styles doesn’t work in search.php
- Pass custom css class to add_menu_page
- How to force unlink on attached/inserted images?
- How to create sub-menu in “Allure Real Estate Theme for Placester”?
- Replacing static code in a template file with a sidebar and widgets?