Space Pirate
Join Date: May 2004
Location: Atlanta
|
I went looking for information on the function get_sidebar() today and discovered that the Wordpress site has been made over in the theme "Butt Ugly"... and that the ubiquitous search bar has disappeared altogether, has anyone noticed this?? (hoping that this is temporary) I thought that it might be nice to have a persistent WordPress thread here since the app is set to go to 2.0 soon and I know that some of you are using WP.
Back to my original search... can anyone tell me if get_sidebar() is a function and if so, in which WP file it is originally defined. EDIT: I'm asking about get_sidebar() because I don't see The Loop implemented in sidebar.php yet it is using elements like the_time() that are supposed to be used inside of The Loop. |
quote |
‽
|
If anything, such a thing would probably be implemented in your specific theme, not in WordPress as a whole, as a sidebar is a visual element.
The second result of a search, btw, points here. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Thanks Chucker, what I'm trying to do is to figure out where the "get_sidebar()" call exists (if it is in fact a true function at all) because I want to see if "The Loop" is played in that function. I'm trying to make a standard "breadcrumbs" trail for a WP site and want to show the "month year" description of a monthly archive. I can't do "the_time()" without running "The Loop". I don't see "The Loop" being used within "sidebar.php" and yet they use "the_time()" and THAT is why I'm trying figure out what is happening.
Now, I've just been to a strip club and had a fair amount of beer... if any of this is incomprehensible then I can elaborate... in the morning you know, when I can think properly.... |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
also... I don't find the "search" ability from the wordpress.org site any longer, as if it has been removed. The interface to the WP docs has taken a drastic turn to the worse in recent days...
|
quote |
‽
|
I'm not sure what you mean by that. I see a big Search field right on the front page. The same field also appears on the support page.
The only site that doesn't seem to have a search field is the Codex, which is currently kind of busted anyway. |
quote |
http://ga.rgoyle.com
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
|
The get_sidebar() function exists in template-functions-general.php. It's only job is to load the sidebar.php template from your chosen theme (or the default theme if your theme does not have a sidebar.php).
I would also say that the call to this function should be outside "The Loop" otherwise you would have 1 sidebar for each post in your blog! This same file also contains the_time() function. OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available! |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Yeah Chucker, I was actually referring to the search bar in the Codex, not the main site. I'm glad to know that the Codex is considered busted my more than just me, glad when it's back on track. I suppose that I need to start reading the updates on what's happening with WordPress...
Thanks for showing me where that function is defined Gargoyle. According to the Codex the_time() must be used within 'The Loop' and yet I cannot find where that is happening in the flow of the code. However, along the way I found that I should be using the call for single_month_title() which is exactly what I wanted because $m is defined (monthly archive). |
quote |
Member
Join Date: Oct 2004
Location: Minneapolis, MN
|
Quote:
|
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Well 2.0 went live today. I won't be an early adopter yet as I'm still spending five hours trying to get things to work (and eventually making them work by the way). Anyone else making the switch yet? I understand that there's some AJAX stuff with the new version...
|
quote |
Senior Member
Join Date: Jun 2005
Location: Iowa
|
Does anyone know if it is possible to alphabatize posts? I am interested in doing this for a certain project I am working on.
P.S. Atomicbartbeans - You can't tell them what it is either until the "public unveiling" Edit : Wohoo! 300th Post Sometimes ... things that are expensive ... are worse. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
If you can get the Codex to work for you try checking out this area:
http://codex.wordpress.org/Alphabetizing_Posts |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
I seemingly have a possibly insurmountable doozy of a challenge now....
My hand-coded WordPress theme is the "single PHP file" solution in that I pass all the necessary user selections back to the same page as variables. As a result a link to a single article just redirects the browser back to the root folder with a numeric variable for the post ('p') following the forward slash ("/?p=2"). I know that there's a section on Using Permalinks but wanted to see if any of the PHP gurus here know for a fact that I can employ the stuff in this article to create "friendlier" permalinks? Yes, I know that there's an article at A List Apart on this too.... yes, I may read it before anybody replies... yes, I just wanted somebody to hold my hand... but there aren't any girl coders in here so just BACK OFF!! |
quote |
‽
|
I'm getting dizzy reading that post.
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Yeah, sorry... probably shouldn't have posted that at all.... I'm about to play with my Permalink structure and I posted before I experimented (something I try to keep to a minimum). I'm in my WordPress control panel now.... Options>Permalinks
Here goes SOMETHING~~~ |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Oy. I don't think my host has mod_rewrite installed and I don't need it that badly!!
I see that the Codex is working again. |
quote |
monkey with a tiny cymbal
Join Date: Nov 2004
Location: Lost
|
Shoot... sorry I'm late to the game here...
The way I typically find templates is with a simple grep command from the terminal. Just a Code:
grep -r 'function fn_name' /path/to/wordpress/dir/ returns the file it's in. I find it much quicker than looking through the codex or anything like that. Of course, if you have 10.4 you can do the same with spotlight (or so I would imagine).As a word of warning on this little trick - don't try to go too deeply with this. It's so easy to reference functions this way that I find myself looking up functions within functions and so on. Trouble is, I can only remember about five levels of looking up stuff before I forget what I was originally trying to do! You can be looking up function calls all night long from one to the next and forgetting where you came from. (I read somewhere (here?) that the brain can only think about 6 or 7 things simultaneously - go beyond that and you start forgetting stuff) It looks like you already found this out, but Permalinks do require mod_rewrite for an Apache server. I'm kinda surprised that your server doesn't support it - most do in my experience. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
After more tinkering I think that my host does in fact have mod_rewrite enabled. I need to tinker with my setup more, not sure that my VERY custom theme will do what I need with "pretty permalinks" enabled. I must say that I am appreciating the differences between WordPress and MovableType.
I'll wait to upgrade to v.2 after the first couple of point updates are released. |
quote |
Less than Stellar Member
|
Well, I just installed wordpress 2 on my server. Well, not MY server, but the server my site is hosted on.
Anyway, I'm having trouble with uploading images. I was getting an error that said "unable to create directory". After manually creating the directories needed, I've encountered "The uploaded file could not be moved to ." I've searched high and low and it looks like the consensus is that safe mode is on on the server and that's causing problems. I'm not 100% that's what the problem is because I dug into the admin_functions.php file and it looks like it's dying when it tries to transfer the file from the temp directory to the permanent one. Maybe this is what safe mode on the server does (it's an IIS server, BTW. Gonna change that real quick.). Any ideas about how to get this working or are image uploads f'ed? If it's not red and showing substantial musculature, you're wearing it wrong. |
quote |
Less than Stellar Member
|
Ok. Much more poking around leads me to believe that it is a safe mode problem. PHP safe mode is on on the server and there seems to be a problem with the upload script - files that are uploaded don't have the same user/group as the directory their trying to be created in.
The upload function *should* work, but it gets stuck at the first step - when I upload the files using FTP they are created with one user/group and when the script tries to create the upload folders, they are created with another. I can't figure out how to change the user/group using Transmit. If I could, I might be able to figure this out. Anyone know? If it's not red and showing substantial musculature, you're wearing it wrong. |
quote |
High Monarch of MacDebate
Join Date: Jul 2004
Location: Kuwait
|
I just finished working on my blog. upgraded to 2.0 and changed the theme. I stayed up till 2am yesterday night and spent the good part of today morning trying to edit the K2 template. I think i am nearly done..
www.248am.com portable: MacBook 2.4Ghz, 2GB RAM, 250GB HD | personal: PowerMac G5 dual 2.3ghz, 6GB RAM, 6TB HD | work: MacBook Pro 2.5ghz, 2GB RAM, 160GB HD | car: Alpine iDA-W407 with black iPod 80GB | pocket: iPhone 3GS with Ultimate Ears Super.fi 5 Pro's |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
I see that there's a WordPress plugin for building a Google Sitemap and got to wondering... in this ever-changing world of climbing to the top of search-engines what's the value of participating in this program. I wonder how important it is to do one of these things if your site has been around for awhile and is frequently crawled by Google.
Edit: Hey Tori you should add a link to your site in your profile like Usurp has! |
quote |
Less than Stellar Member
|
Quote:
|
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
I've installed a few plugins recently, one of them is called "Popularity Contest". It allows you to weight hits to articles and then lists the most-viewed articles. I thought that this would be a neat way to pull dusty articles back out to the front page but it hasn't worked out that way because, so far, the stories that are listed in the list encourage visitors to click and read... which bumps up the score EVEN MORE for the articles on this "often viewed" list.
From what I can tell it will just be a trailing list of recently posted articles. Heck, some articles might have such ridiculously skewed numbers that they NEVER fall off the list. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Does anyone know if you can make hotlinks in an article post use template tags? I like using pictures in my articles and have noticed (in unplanned user tests) that people often try to click those images to get to the rest of the article. I'd like to oblige them if I could....
|
quote |
Less than Stellar Member
|
Quote:
|
|
quote |
Less than Stellar Member
|
I'm sure you've already seen this, but in case you haven't...
I'm thinking that you can use the custom keys/value settings. Here are my thoughts: In template-functions-post.php add this: Code:
?php the_content('Read More...<img src="<?php echo $hotlink ?>"
alt="read more" title="Read More..." />'); ? In the custom fields, have the key be hotlink and the value be the name of your image. I've got NO idea if this would work, but it could. :shrugs:edit: my php statement may be off. It's always trial and error with this stuff for me. Last edited by torifile : 2006-02-23 at 00:51. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Great link although it doesn't help with my specific issue... HOWEVER it does show how to stop WP from leaping to the "more" anchor tag when people follow an excerpt to an individual post (a fix which I'll implement tonight).
I don't see an easy fix for making article photos into links to the articles which they belong. I am currently hand-coding the IMG markup within the body of each entry, so the images are part of each post, not a regularly recurring decorative graphic that can be specified by the_content() tag. Also, the only time that you would need for the image to work as a hotlink is when it's in an excerpt, as on an archive page. When it's on an individual entry page it should not be a hotlink because you're already looking at the full article by that time. Since the image code is always different from article to article I don't see a way to make the image link to the full article. I tried wrapping the photo with an anchor tag with a wordpress PHP call inside that doesn't work... I suspect that it has something to do the post being written out within The Loop, not being parsed by The Loop. Still, it would be neat. |
quote |
Less than Stellar Member
|
Quote:
|
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Oh wait, the custom key is in the "Write" pane of the the admin section? I'll look into that tonight.....
|
quote |
Less than Stellar Member
|
Quote:
Thinking more about this, I bet writing a function that does this wouldn't be too hard. You could have a simple "if" statement in the template-functions-post.php file that checks to see if something like "hotlinkimg" isset and execute your custom "more" code. If not, have it continue as before. Should actually be relatively trivial (at least conceptually). |
|
quote |
Posting Rules | Navigation |
Page 1 of 8 [1] 2 3 4 5 Next Last |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cum sEE my SiLLy tHreaD and mOCK mE 4 it!!!1!1! | chaos123x | Speculation and Rumors | 90 | 2006-10-05 13:22 |
The Official Dating Commentary™ Thread | ShadowOfGed | AppleOutsider | 63 | 2006-05-08 10:13 |
Validating CSS from Wordpress | Jason | Programmer's Nook | 7 | 2005-11-21 21:13 |