The MU forums have moved to WordPress.org

Creating "Ready Made" blogs with Widgets/Feeds/Adsense/etc (9 posts)

  1. Anonymous
    Unregistered
    Posted 15 years ago #

    Ok, this might be a stupid question, but I can't seem to find a clear answer.

    I'd like to create a system so that when someone signs up to a blog, they have full creative control over the theme/comments/categories/posting/etc as normal, but there should be constants throughout the blogs. Such as :

    * A "Recent Posts" widget or link that has all of the Recent posts from all of the other blogs
    * Adsense ads
    * Recent Comments from other blogs
    * A link to every other blog in the system
    * A global blogroll

    Etc.

    How would I best go about creating something like this?

    I've set up a number of Wordpress blogs, and I managed to get MU up and running pretty well, but I don't have any experience in coding or creating/editing script or plugins.

    Any suggestions would be highly appreciated.

    Thanks so much

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Hardcode it in to the theme sidebars. :)

  3. Anonymous
    Unregistered
    Posted 15 years ago #

    Hi!

    Thanks very much for your reply. I've been searching about the internet for a while without much luck - could someone direct me to some resources on hardcoding RSS feeds?

    Thanks!

  4. andrea_r
    Moderator
    Posted 15 years ago #

    http://wpmututorials.com/plugins/how-to-display-users-blog-posts-feed-on-your-main-page/

    While this pulls the sitewide feed onto the main page, the process is exactly the same if you want a feed hardcoded into a theme's sidebar.

  5. Anonymous
    Unregistered
    Posted 15 years ago #

    Ok, I've managed to do this. I've even got it working for external RSS feeds, but when I try to use Sitewide feed, I get this error :

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /home/yoursite/www/wp-content/themes/oceanmist/sidebar.php on line 44

    Line 44 is :

    $items = array_slice($feed->items, 0, $maxitems);

    Any ideas? I'm so close here !!

  6. Anonymous
    Unregistered
    Posted 15 years ago #

    Sidenote : outside of this hardcoded RSS feed, the Sitewide RSS feed works just fine.

  7. Guru06
    Member
    Posted 15 years ago #

    Andrea I have a question with hard coding the sidebar. Wont this hard coding get overwritten when they place a widget in the sidebar? Is there a way to create a widget enable sidebar but keep items hard coded such has advertising?

  8. cafespain
    Member
    Posted 15 years ago #

    Yes, in a widget enabled sidebar there will be an if statement along the lines of:
    if(widgets)
    do widgets
    else
    do hardcoded
    end if

    Change this to
    if(widgets)
    do widgets
    end if
    do hardcoded

  9. worldblogosphere
    Member
    Posted 15 years ago #

    How would I go about hardcoding a widget or plugin into the sidebar?

    Would I just use a PHP include call? If so do I just call the main file within the plugin? I mean exactly what gets called when you place a widget in the sidebar the normal way?

    Thanks for any help

About this Topic

  • Started 15 years ago by crackapol
  • Latest reply from worldblogosphere