The MU forums have moved to WordPress.org

Blog list on individual page (19 posts)

  1. Lucifix
    Member
    Posted 17 years ago #

    Hi all!

    Can please anyone tell me how can I create bloglist with all active page on individual page.

    Example: http://bloggi.org/bloglist/

    I know that I can use this code http://wpmudevorg.wordpress.com/project/List-All but I simply don't know how to make individual page?

    Thank in advance!
    Lucifix

  2. andrea_r
    Moderator
    Posted 17 years ago #

    You make your own page template for it. See here:
    http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates

    Briefly, you create a new file in your theme's folder. Take the page.php one and copy it. Call it list.php or something, doesn't matter. At the top in the comments, make sure you call it your List template.

    Now take out The Loop, the chunk of code that generates the post. Paste in the call for listing all the blogs. Save.

    No go to Admin, and Write Page. Put in your title and NO body text. On the side, there's a drop-down list for which template file to use. The List one you just created will be on it. Pick it and save.

    Publish and view your work.

  3. Lucifix
    Member
    Posted 17 years ago #

    Thanks andrea_r, I think I have idea how to do that ;)

  4. reggordon
    Member
    Posted 16 years ago #

    I must have read this post a year ago and really couldnt make head nor tail of it but that was more down to me and the 'if you don't know php then dont get wpmu'. Now a year of fiddling with this awhilst doign other things i now understand half of it and that feels good. Now it's time if i may to find out the other half of it.

    The 2 bits im stuck on are-

    "At the top in the comments, make sure you call it your List template."

    I am hoping htis is so simple that its went under the radar for me but what comments would they be folks?

    There has been many time when i am away from the compter and i ask myself 'but what is 'The Loop'?' and i never get to find out. Just from reading this i think im getting a better idea of it. Nope i have no idea. If i can post code i might have a stab as this being my loop from a page i copied from my template. Nope soz i really dont know what the loop is. Sory about this but can anyone point it out in this example for me? thanks

    <?php get_header(); ?>
    
    <div id="content">
    
    	<div id="contentleft">
    
    		<div class="breadcrumb">
    			<?php if (class_exists('breadcrumb_navigation_xt')) {
    			echo 'Browse > ';
    			// New breadcrumb object
    			$mybreadcrumb = new breadcrumb_navigation_xt;
    			// Options for breadcrumb_navigation_xt
    			$mybreadcrumb->opt['title_blog'] = 'Home';
    			$mybreadcrumb->opt['separator'] = ' / ';
    			$mybreadcrumb->opt['singleblogpost_category_display'] = true;
    			// Display the breadcrumb
    			$mybreadcrumb->display();
    			} ?>
    		</div>
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<h1><?php the_title(); ?></h1><br />
    
    		<?php the_content(__('Read more'));?><div style="clear:both;"></div>
    
    		<!--
    		<?php trackback_rdf(); ?>
    		-->
    
    		<?php endwhile; else: ?>
    
    		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    
    	</div>
    
    <?php include(TEMPLATEPATH."/sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>

    If i suss this out it should open up a few doors and a new level of awareness for me.

    Thanks

  5. andrea_r
    Moderator
    Posted 16 years ago #

    This bit:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<h1><?php the_title(); ?></h1><br />
    
    		<?php the_content(__('Read more'));?><div style="clear:both;"></div>
    
    		<!--
    		<?php trackback_rdf(); ?>
    		-->
    
    		<?php endwhile; else: ?>
    
    		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>

    is the Loop.

  6. reggordon
    Member
    Posted 16 years ago #

    Brlliant andrea that solves that ongoing problem for me. Everyyonbe just just casually says 'the loop' and folks reply 'oh aye the loop' and im never any the wiser.

    Where would i find these comments to change the template name?

    thanks

  7. andrea_r
    Moderator
    Posted 16 years ago #

    Right at the top of the file. You're changing a Page template, aye? ;) To make a new one?

    Darn, I thought I'd written about this on my site somewhere... holler if you get stuck.

    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates

  8. reggordon
    Member
    Posted 16 years ago #

    Brilliant andrea thanks. It all makes sense now. Adding

    <?php
    /*
    Template Name: mynewtemplate
    */
    ?>

    To any new page (which i copied from page.php in my template) makes it appear in Page Template when i write a post. It's all like a big jigsaw. I cant get the list all to disply on the page but i'll look into that later as i have the list all widget doing the job for me. Knowing how to make page templates is great and opens up a world of possibilities to me. thanks again for all your help

    Reg

  9. andrea_r
    Moderator
    Posted 16 years ago #

    Put the list all function call on that page template *instead* of the loop. that should do it.

  10. reggordon
    Member
    Posted 16 years ago #

    Thanks andrea. I was hoping to report back complete success but alas i have a problem houston. I am replacing what you posted as being THE LOOP with the call for the list all andrea but sadly it's just showing the call code in text on the page. This is the call i am using-

    list_all_wpmu_blogs('100', 'name', '<p>', '</p>', 'updated');

    Ive done everything correct so far. I must be doing something wrong. Is this a common noob mistake?

  11. andrea_r
    Moderator
    Posted 16 years ago #

    Yep, it is. :)

    You have to edit the template itself, not when writing a Page.

    Email me your Page template to andrea at atypicalife dot net and i'll email it back how it *should* look. :D (less than 5 minutes work)

    then when the new template is in the themes directory, you go to write page make a title, DON'T put anythign in the content area and from the right, choose that new template file, then publish.

  12. reggordon
    Member
    Posted 16 years ago #

    bah and blast. I thought i had sorted it as i had some text in the post. Removed that and still the same prob. Sorry for troubling you like this andrea. I'll go email you and it's all much appreciated. Let me try figure this out though before emailing.....

    nope i seem to be doing it right :( i think i better email you and your a star andrea. Thank you very much.

  13. mrmarkman
    Member
    Posted 15 years ago #

    Sorry for drawing this thread back up, but I am having a trouble. I think I have followed everything correctly, but now when I make the page, I visit it and it is just a black page.

    Is this a common issue--what am I doing wrong?

  14. MrBrian
    Member
    Posted 15 years ago #

    If you meant BLANK page and not black, then theres an error on the page and you need to display_errors to see what's causing the problem.

  15. mrmarkman
    Member
    Posted 15 years ago #

    Sorry, I meant blank ye, sorry.

    I just realised I had done something terribly wrong, I sorted it out.

    But then, I get another trouble. The code is just displaying as text.

    Any help would be greatly appreciated.

  16. mrmarkman
    Member
    Posted 15 years ago #

    Sorry for the multi post, but I then realised I should put the code in php tags, which I did. I made a new blog and posts to test it, but nothing showed up. Any thoughts?

  17. andrea_r
    Moderator
    Posted 15 years ago #

    Are you inserting the php directly in the post area? Because if so, that's what's wrong. You need to create a page *template*.

    instructions here:
    http://wpmututorials.com/how-to/making-a-member-list-blog-directory/

  18. mrmarkman
    Member
    Posted 15 years ago #

    That's what I tried to do, but it's just not working.

    Here's what I did:

    1) Uploaded list-all.php into my plugins directory.
    2) I made the default theme as mu-default (not necessary, but thought it'd be easier to work with).
    3) Downloaded page.php.
    4) Duplicated it, then renamed it as bloglists.php
    5) Made changes so that it now reads:

    <?php
    /*
    Template Name: Blogging Lists
    */
    ?>

    <?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php list_all_wpmu_blogs('100', 'name', '<p>', '</p>', 'last_created'); ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    6) Uploaded it to the default theme directory.
    7) Made new page with 'Member Lists' template, only with title and nothing in text area.
    8) Made a new blog and tested it with a new post (not private).
    9) Nothing shows up, just the heading, background but no sidebars or anything. See here:

    http://writingclubs.byethost10.com/wpmu/blogs-list/

    Do you know what I am doing wrong?

    Thanks, help greatly appreciated!

  19. mrmarkman
    Member
    Posted 15 years ago #

    Never mind, I sorted it out. Yay!

    Anyway, all I did was uploaded the list-all.php file into the plugins directory, as opposed to the mu-plugins. I'm an idiot. Thanks!

About this Topic

  • Started 17 years ago by Lucifix
  • Latest reply from mrmarkman