customizing wpmu-nelo

Greeting and thanks for all the hard work. I'm overhauling our site using Nelo as the new main blog's theme and have a couple questions (so far):

1. Perhaps a silly question, but is it possible to still have a "blog homepage" on a separate page when using a Custom Homepage configuration for the Home page? For instance, using Mandigo theme, we currently have Reading settings set to static page for Home, with the most recent blog entries (Blog Homepage) on the "News" page. We would like to use the Nelo Custom Homepage configuration with custom post and recent posts links, but also keep the News page that shows all the blog entries which members are accustomed to seeing. Am I making sense?

2. Is there a way to hard code additional links into the header navigation? We'd like to add links to a few of our own Featured Blogs and a "Join" link in the header. Mandigo allowed us to do this by hardcoding additional items in the header nav list. But when I attempt to do this as follows, the words just run together and are out of alignment with the other pages...

<div id="navigation">
<ul id="nav">
<li><a>" title="Site Home Page">home</a></li>
<?php wp_list_pages('title_li=&depth=0'); ?></p>
<li>gear</li>
<li>gifts</li>
<li>etc</li>
</ul>

I've had it with Mandigo and am looking forward to cleaning up our site and underlying code. Any feedback is greatly appreciated.

EDIT: Sorry, that was the only way I could get the example code to show without actually creating a bulleted list.

  • drmike

    Give this a read:

    http://wordpress.org/support/topic/351562?replies=2

    They fake it. They display part of the list first, add in the static links and then display the rest. Not sure if that'll work for you though since we're talking about tabbed links along the top.

    Gotta admit we just hard code all of the page links normally. We do this on the main theme for the main site since that's going to be the most viewed blog on your install and the fewer mysql queries, the better. We build the site, get it to display in your browser, copy out the html code and replace the wp_list_pages function call with the saved html code, making the changes that you need.

    Hope this helps,
    -drmike

    edit: Found this as well:

    http://sivel.net/2009/03/adding-additional-links-to-the-output-from-wp_list_pages/

    A filter would probably work best if you don;t want to hardcode the theme.

  • jcnjr

    OK, got the navigation links working. Thanks again to drmike for that simple fix.

    But I may have to ditch all the time I've spent so far modifying this theme to meet our needs if I can't get a blog homepage to display in addition to the nelo custom homepage. We have hundreds of links throughout our blog, forums, and the interwebs at large pointing to our current page "domain.com/progress" which currently loads the recent blog posts. I'm wondering if anyone can tell me if its even possible to do what I'm attempting with this theme.

    On another note ... I notice the profile box is pulling in Gravatars, not Avatars from the premium plugin. I assumed it would do the latter considering this is a premium theme. Anybody have a fix for that too?

    Thanks again.

  • Sue

    @jcnjr Richie should hopefully be able to explain how to "create a "blog homepage" while also using nelo's "Custom Homepage" - as he designed the theme. I will let him know in case he misses this thread or assumes it has been answerd.

    Question on gravatars and avatars in the profile image is also a Richie question. Here's what I've worked out. On comments it displays my Avatar from the avatar plugin while the profile image for logins is pulling my Gravatar image -- not that this concerns me since the only person that sees the profile image in the login box on the three WPMU (Dixi, Triden and Nelo) is normally the person who is logged in.

  • Richie_KS

    hi jcnjr

    in nelo theme, there should be a page-news.php
    you can set that as page template and it will be a blog style with latest post and pagination etc.

    @gravatar in nelo
    yep..the profile didn't optimize to used the Avatars from the premium plugin..it used
    gravatar only...open up profiles.php and changed this code


    <?php echo "< img src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=52&default=$default' alt='$user_identity' />"; ?>

    to


    <?php if (function_exists('get_avatar')) { ?>
    <?php echo get_avatar( get_comment_author_email() , 52 ); ?>
    <?php } else { ?>
    <?php echo "<img src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=52&default=$default' alt='$user_identity' />"; ?>
    <?php } ?>

    cheers

  • jcnjr

    Sweet, thank you both for the simple answers!

    I just confirmed, however, that upon activation the WPMU-nelo 2.1 child theme is not making the page-news.php template available. I have a modified copy of the ful-width [sic] page template in the child directory, but other than that, only the default is present in the page template pop-up menu when editing pages.

    Thanks again, I'll mess around some more and report back.

    Question about Child Themes: If we place edited versions of template files in the child directory, they should take precedence, right? I thought that's what I read about how they work, but it's not doing the trick for us. A modified header.php file is only working if we edit the original in the parent folder.

  • jcnjr

    wpmu-nelo v. 2.1.2 confirmed.

    News page template is working now. I must have moved the template file instead of copying it. I just confirmed its in the fresh download too, and after putting it back in the parent folder the template is available from page -> edit. And, it does just what I need it to. Thanks!

    My only remaining issue with this parent/child structure is that my modified version of header.php is not being applied when edited and placed in the child directory. My modified page template is working as it should from the child folder, but not the header. I must edit the original header.php in the parent folder for changes to take effect.

    I thought I read here that any edited theme files placed in the child directory will override those in the parent folder. Does this only apply to page templates and styles? Or should the child header be working? If so, something is going wrong. I don't mind hacking the main template files, since we won't be activating it for member blogs. But i just want to make sure its working like it should be.

    Thanks again for your help, and for answering my most important question about using the blog page in addition to the custom homepage.

  • Richie_KS

    mm..thats odd..i tried child theme with customize header and it work ok...i copy the page-news.php to child folder and remove post title and the child theme also reflect this.

    please confirmed following

    the folder name are
    wpmu-nelo
    wpmu-nelo-child

    changed in parent theme name may reflect the child theme.

    in child theme style.css, check if there a 'template' tag like below..this is the connection to parent theme.

    Template: wpmu-nelo

    My modified page template is working as it should from the child folder

    what kind of changes did not work?
    is it images link or code etc..let me know ok..
    maybe a common stylesheet_directory vs template_directory issue.

  • jcnjr

    OK. All is good. After a fresh download and re-install of Nelo; the modified header, styles, and page templates are all picking up properly from the child directory. Looks like there were edits to some files, I must have had an old version.

    Only two remaining issue (so far) ...

    1. The Premium Avatars hack does not work. Default Gravatar is still showing after edit and clearing of cache.

    2. The custom homepage is now displaying a cropped thumbnail of the header image next to each recent post, with the following attributes:

    <div class="alignleft" style="float: left; width: 180px; height: 150px; background: url("http://tripawds.net/files/2010/03/cropped-20080506w_carsonboondock02-300x66.jpg") no-repeat scroll center center transparent; overflow: hidden;"></div>

    That wasn't there before and I can't find any option anywhere for turning off or resizing related post photo thumbnails ... !?!?!?

    EDIT: Here's link to what I'm talking about http://tripawds.net/

    Thanks for the help! Don't be surprised if I return asking for more.

  • jcnjr

    try edit the code like this around 105

    That did the trick, thanks!

    @gravatar it work in my end tho..

    Are you running BuddyPress? We are not. I forgot to add the get_avatar function back in after updating the theme files. But I just added that code you provided above again, and the profile now displays the site default avatar (instead of a gravatar), but it still does not show the user avatar, even after uploading a new one. The correct user avatar does appear elsewhere, on comments, etc.

  • jcnjr

    I'm Back! Finally taking on the task of overhauling our theme and hacking Nelo to bits. So far so good, just a couple questions:

    1. The Anti-Splog rotating signup page URL is not working when used in the custom homepage content. When I add the tag href="[ust_wpsignup_url]" the rendered link is http://sitename.com/ust_wpsignup_url ... ???

    2. I can't seem to find an option for the number of posts to show in the main intro box when selecting custom post and recent post. It shows five posts, is this number hard-coded? If so, where would I look to change it?

    3. Either "Menus" are not working, or I don't know what I'm doing. I created a menu, but when activated it replaces the navigation strip. How can I add a menu to the navigation? If not available via Theme Options can this be hardcoded? I need to show the menu and main blog pages.

    That's it, for now. Thanks in advance for your help. FYI: I just downloaded and am working with the most current version.

  • Richie_KS

    hi jcnjr

    1. the custom homepage post panel did not support shortcode..you might want to enter the full actuall signup url instead of the shortcoe [ust_wpsignup_url]

    2. should be editable in custom-homepage.php line 107

    <?php $my_query = new WP_Query('category_name=&showposts=XXX');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    $the_post_ids = $post->ID;
    ?>

    XXX - you post count

    3. they should be editable and replace using the new wp 3.0 menu in Appereance->themes->menu
    and choose your menu in left panel "main navigation"..

    cheers

  • jcnjr

    Thanks! I'll look into your suggestions for questions 2 & 3 and report back.

    But regarding 1... the "full actual signup url" changes dynamically when using the Anti-Splog plugin. And this theme is not translating the short code.

    Perhaps other WPMU Dev developers may be able to help get this theme to play nice with the plugin? Otherwise, I may need to just link to our about page which includes signup links via the translated shortcode. This just adds an extra step for new members.

  • jcnjr

    UPDATE: I was able to modify the custom homepage post count and got them menus working, thanks again.

    HOWEVER: I think we may need to get an Anti-Splog plugin developer involved to help address signup page issues other than the one I mentioned above (I can live with that if necessary).

    I discovered that the redirect for the signup url is not working as expected with this theme when "Rename wp-signup.php" is turned on in Anti-Splog settings. I edited the "Create new account" link in profiles.php as follows, but the page that loads says "You must log in to create a new site", when it should display the register form (see attachments).

    <?php if(function_exists('get_current_site')) { ?><a href="<?php ust_wpsignup_url(); ?>"><?php } else { ?><a href="<?php echo get_settings('siteurl'); ?>//wp-login.php?action=register"><?php } ?><?php _e('Create a new account', 'nelo'); ?> </a>

    The same issue occurs with a ust_wpsignup_url link I hardcoded into the header navigation. You can see an example of what's happening at the test site I'm working on here: http://tripawds.net

    Feedback from anyone is greatly appreciated!

  • jcnjr

    Sorry to bump this so soon, just wanted to clarify something I just noticed that might help identify what's going on...

    If the user is logged in, the proper signup url loads as expected, identifying the user and asking about adding a new site. But if they are not logged in, they are asked to log in to create a site instead of being presented with the registration form.

    Thanks again for the help!

  • jcnjr

    just wanted to clarify something...

    My Bad! Feeling pretty stupid here right now – I had registrations turned off. :-\

    After turning on reg. for sites and user accounts the ust_wpsignup_url links that I added via php are translating and functioning perfectly. Sorry for the panic.

    If there's a way to get the custom homepage intro box to translate shortcodes, great! If not, no worries.

    Thanks again for all your hard work. I'm sure to be back with more questions, but we're getting there!

  • jcnjr

    No question this time! Just wanted to let you know of a fix required to show any edits made to the profiles panel.

    Some changes I made were only appearing on the custom homepage, but not in the site-wide sidebar. I discovered the problem on line 6 of sidebar.php...

    It was:
    <?php include (TEMPLATEPATH . '/profiles.php'); ?>

    And it needs to be:
    <?php locate_template ( array('profiles.php'), true ); ?>

    After I made this change to the parent sidebar.php, the changes I made to my child profiles.php showed up sitewide. I noticed the difference in how custom-homepage.php called the profile panel.

    I hope this makes sense and helps!

    PS: I started a new Plugin Support topic reporting that supporter_hide_ads does not seem to be working with Nelo.

  • jcnjr

    OK, more questions...

    How can I edit the "blockquote" style? And how can I edit the styles attributed to the threaded comment replies?

    I have tried adding the style attributes to child-style.css and even tried moving an edited copy of wpmu-nelo/wp-comments.css to the child folder. No changes I make to the styles affect the way these elements display.

    Sorry to be such a pest, but I could really use the help. Thanks!

  • Richie_KS

    hi jcnjr

    1. how to edit blockquote style?
    should be editable in global.css (line 304) but you also can add this to child-style.css

    #custom .post-content blockquote {
    margin: 1em 25px;
    line-height: 24px;
    font-size: 16px;
    font-weight: normal;
    padding: 10px;
    font-family: Georgia, "Times New Roman", Helvetica, sans-serif;
    font-style: italic;
    border-left: 5px solid #000000;
    }

    2. edit comments wp-comment.css?
    no need to add another copy of wp-comments.css into child theme.
    when adding style class/id in child-style.css add #custom to overwrite the parent css.

    cheers

  • jcnjr

    ...add #custom to overwrite the parent css.

    Thanks for that! I was able to edit the blockquote style that way.

    But I then had a hard time editing the style for the comment list boxes, and I think I discovered a glitch. The boxes get filled with whatever color value I apply to grid lines in the Theme Options. See the attached screen shot. If I leave the value blank, the boxes are not colored. But they get filled with whatever color is entered for that option...

  • jcnjr

    So, I think I'm getting really close to completing this makeover... no, really!

    Just a couple things still keeping me scratching my head:

    1. Any suggestions for getting my edited profile panel to show up on the custom homepage and in my sidebar? See posts above: 71168 & 71656

    2. Any idea what might be causing these errors:
    [error] File does not exist: /home/triblogs/public_html/wp-content/themes/wpmu-nelo/none, referer: http://tripawds.net/wp-content/themes/wpmu-nelo/nav.css
    [error] File does not exist: /home/triblogs/public_html/wp-content/themes/wpmu-nelo/none, referer: http://tripawds.net/2010/12/26/this-is-a-new-post-2/
    [error] File does not exist: /home/triblogs/public_html/wp-content/themes/wpmu-nelo/none, referer: http://tripawds.net/
    [error] File does not exist: /home/triblogs/public_html/wp-content/themes/wpmu-nelo/none, referer: http://tripawds.net/forums/technical-support/

    FYI: I resolved the colored comment box issue (Post # 71561) by just selecting a lighter colored grid line, though I prefer the darker lines and it would be nice if that option didn't fill the boxes.

    Thanks again!

  • jcnjr

    OK Richie, can you please help me? I was nearly done with my theme overhaul and noticed you posted a new version of WPMU Nelo. Thinking it might address my last couple questions, I uploaded the new parent folder, keeping my old child folder, and have now lost all of my customization.

    My Theme Options and Widgets were saved but all my CSS edits and the changes I made to header, footer, profiles, and custom-homepage are not showing. My custom Menu is also no longer in my Nav bar.

    Do I need to make all these changes again? I thought the whole idea behind child themes was to avoid problems like this during updates. Please advise at your earliest possible convenience. Thank you!

    EDIT: After re-selecting my custom menu from Appearance -> Menus, it now functions properly in the nav bar. Still can't get all my theme file edits working.

  • jcnjr

    All right, after uploading the new wpmu-nelo-child directory and copying all my edited theme files into it, and re-activating WPMU Nelo Child as the site's theme, my customization in back. I suspect this is not how updates are supposed to work. I shouldn't have to do this every time, right?

    Things seem to be looking as they should again, though I am still experiencing both issues from post 71942 above.

    Will I need to duplicate my edits to custom-homepage.php and/or profiles.php using the new files to fix question #1? Any suggestions about question #2?

  • jcnjr

    Regarding those File Not Found errors, I keep getting them. Lots of them, like every time a page loads ever since I activated a custom navigation menu...
    [error] File does not exist: /home/triblogs/public_html/wp-content/themes/wpmu-nelo/none, referer: http://tripawds.net/wp-content/themes/wpmu-nelo/nav.css

    I think I *may* have figured out the cause, but need help determining a fix.

    The parent theme nav.css includes:

    #nav li li{<br />
    	background: url(none)!important;<br />
    	padding: 0px!important;<br />
    	}

    It seems like that "none" bit should be an actual file location. But what do I know, can someone please verify and offer a suggested fix? Could I just add this as a custom class to the child style.css and remove the background attribute? Or, would I have to add a nav.css file with the custom class to the child folder for this to work?

    Still looking for an answer about the Profile panel not showing up on all pages. I figure it has something to do with this in profiles.php:
    <?php echo stripslashes($tn_wpmu_profile_text); ?>

    THANK YOU!

  • Richie_KS

    @file none error log
    yeap its the css url(none) causing the issue.
    try edit any css like

    .mycss {
    background: url(none)!important;
    padding: 0px!important;
    }

    to

    .mycss {
    background: transparent none !important; /*similiar case if with color - #99999 none !important */
    padding: 0px!important;
    }

    change url(none) to none only with spacing on both side...

    @profiles erro
    try adding this on top on nelo parent theme profiles.php
    <?php include (TEMPLATEPATH . '/options.php'); ?>

    cheers

  • jcnjr

    FYI: Just discovered something you might consider for a future update of this theme, though admittedly I don't know if this is theme-specific or a core WP function...

    Images from NextGen Gallery (popular photo gallery plugin) do not display as the Featured image. They can be selected from the backend and show on the post edit page, but they will not show on the custom homepage.

    And, there seems to be no control over the cropping of featured images displayed on the custom homepage.

    Thnaks again... Stay tuned for our site makeover announcement. What link shall we provide for you (Richie) to give credit for all you great work?

  • jcnjr

    Images from NextGen Gallery (popular photo gallery plugin) do not display as the Featured image.

    FYI: Selecting images from NextGen galleries does work on the News page template, but they do not show on the Custom Homepage, only featured images set from the WP Media Library show there.

    I compared the two files and noticed the following differences...

    custom-homepage.php
    <?php custom_get_post_img ($the_post_id=$the_post_ids, $width='180', $height='150', $size='medium'); ?>

    page-news.php
    <?php if(function_exists('the_post_thumbnail')) { ?><?php if(get_the_post_thumbnail() != "") { ?>
    <?php the_post_thumbnail(array(200,160), array('class' => 'alignleft')); ?><?php } } ?>

    After replacing the former (get_post_image) on the Custom Homepage with the latter (the_post_thumbnail) from the News page template, featured images selected from NextGen display in both places.

    Might consider this fix for a future update. I also notice the excerpt calls differ – the_excerpt (News template) vs. the_excerpt_feature (Custom Homepage).

    Hope this helps. Thanks again for all your help. We just launched our site overhaul and the feedback has been excellent. We'll be posting details in a new topic soon.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.