Rich Owings
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)Thanks. I had to check, but it is indeed outside the loop. I’ve marked the topic resolved. Thanks again for your help.
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)That did it. Woohoo! Thank you so much for taking the time to help folks like me. I greatly appreciate it.
A comment and question, if I may…
I believe that the line
} elseif ($category->cat_ID -- 123) {
should be
} elseif ($category->cat_ID == 123) {Also, if I want to add a third custom sidebar, can I just add another elseif statement?
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)Yes, most of the posts have multiple categories, typically a parent and a child.
And just to be clear, I’m looking to display the custom sidebars when a single post is displayed from the appropriate category. What I’m attempting has nothing to do with category view.
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)@vtxyzzy –
Well, the second one (sidebar_custom123) shows up in the right place when I try that, but not the first one (sidebar_custom).
@darrellonsite – I tried this approach, but it’s not working. It could well be some sort of syntax error on my part. Here’s what I did…
<?php $cat_id = get_query_var('cat'); if(in_array($cat_id,array("165","166"))){ include(TEMPLATEPATH."/sidebar_custom.php"); } if(in_array($cat_id,array("163","164"))){ include(TEMPLATEPATH."/sidebar_custom163.php"); } else { include(TEMPLATEPATH."/sidebar.php"); } ?>I also tried making the second if an elseif, but that didn’t seem to change things.
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)Thanks vtxyzzy and darrellonsite. Family obligations will keep me from trying these until Sunday or Monday, but I’ll report back here once I do.
Forum: Fixing WordPress
In reply to: Coding for multiple custom sidebars (elseif)Thanks vtxyzzy. Oh so close. It called the right one, but then kept repeating the primary sidebar. They just stacked on top of each other. Any idea why?
Forum: Fixing WordPress
In reply to: Empty xml export fileAfter doing some database cleanup (optimize, remove revisions, etc.), this problem cleared up, as did issues my sitemap time outs and backups not being emailed.
Forum: Fixing WordPress
In reply to: Customizing AFTER the more tagThat worked. Thank you so much!
It’s really awesome that folks like you take the time to help people here. It’s one of the things I love about the WP community.
Forum: Fixing WordPress
In reply to: Customizing AFTER the more tagThanks. What I have right now is just this…
<!-- BEGIN MORE TEST --> <?php $story = get_the_content(); $story = explode('<span id="more',$story); $first_part_of_story = $story[0]; $second_part_of_story = $story[1]; $first_part_of_story = apply_filters('the_content', $first_part_of_story); echo $first_part_of_story; if ($second_part_of_story) { TEST MORE BREAK ; } ; $second_part_of_story = explode('</span>',$second_part_of_story); $second_part_of_story = apply_filters('the_content', $second_part_of_story[1]); echo $second_part_of_story; ?> <!-- END MORE TEST -->Forum: Fixing WordPress
In reply to: Customizing AFTER the more tagThanks so much for taking the time to share this! My PHP skills are still at the newbie level, so if you don’t mind a couple of beginner questions…
1. I can just replace <?php the_content(); ?> with the code above, right?
2. Do I just replace // here ‘something’ code // with my code or text? I tried that but got an unexpected T_STRING error on that line.Thanks again. I really appreciate this very much.
Forum: Fixing WordPress
In reply to: Can’t access admin; otherwise site okayHey guys, I’m in! Re-installing 2.2.1 worked. Now I just have four more updates to do! Thanks so much for your help!
Forum: Fixing WordPress
In reply to: Customizing AFTER the more tagI’m aware that the Sniplets plugin will do this, but its not working on my main site.
Forum: Fixing WordPress
In reply to: Can’t access admin; otherwise site okayHere’s another question. Any way to do an XML export without access to the admin panel? I’d like to have a full XML export file in case it’s desirable to restore from that.
Forum: Fixing WordPress
In reply to: Can’t access admin; otherwise site okayI’m trying to work through the relevant options in http://codex.ww.wp.xz.cn/Login_Trouble. I tried disabling plugins (by renaming the folder) and uploading a new wp-login.php file. That gave me a login screen, but I still get a 404 after submitting my userid/pw. I was going to try and edit the users table, but the md5 hasher isn’t working for me.
Any suggestions? Otherwise, I think I’ll just try uploading 2.2.1 again as if I were updating.
Forum: Fixing WordPress
In reply to: Can’t access admin; otherwise site okay