42 reputation
6
bio website
location
age
visits member for 7 months
seen May 7 at 23:12
stats profile views 7

May
5
comment infinite scroll page number
Ah, and it seems that even with jetpack in dev mode I can't use infinite scroll on a local site? I was going to use HTML5 history API to append the name of the current post in view, but when using the back button it always just shows the newest posts and you have to scroll down again to load in the ones you were previously viewing, so that's out.
Apr
28
comment Restrict authors to seeing ONLY their media files
Tested that, doesn't work unfortunately.
Apr
24
comment Highlight post in sidebar on single page
Ah nevermind, I'm being dopey because I didn't sleep last night, I change the echo to the containing li and forgot to change the function accordingly, now I've just got to work out how to make it work for single pages only!
Apr
24
comment Highlight post in sidebar on single page
Yes, that's where I put it! :p Ah, I'm silly, it is spitting out a style in the themes header now. <style type="text/css" media="screen"> body.postid-453 a.post-453 { background-color: #f00; } </style> The problem is it's not styling the post, hrmm.
Apr
24
comment Highlight post in sidebar on single page
Well adding the echo get_the_id in on the permalink in the sidebar loop certainly shows the posts ID, but that function doesn't seem to do anything when I paste it in my sidebar, not on the single nor the index or any other page.
Apr
17
comment Ajax loop in sidebar to load post titles/categories
I'll accept your answer since you put a lot of effort intro trying to help me, thanks.
Apr
17
comment Ajax loop in sidebar to load post titles/categories
Sorry for the delayed response, I've been ill the last few days. What do you mean by 'put into a function'? In my funtions.php or do I create a new file then add_action to register it in my functions file?
Apr
16
comment Ajax loop in sidebar to load post titles/categories
And by the way, that php being on my page COMPLETELY screws up may layout, the output of other loops doesn't show up etc.
Apr
16
comment Ajax loop in sidebar to load post titles/categories
Thanks for the long, detailed response, Ralf. But how do I place a button that can be clicked to run this?
Apr
13
comment Recent posts in current category?
do I have to do endforeach; or anything to close it off?
Apr
13
comment Recent posts in current category?
Ah yes, I'm an idiot! That's excellent, Pat, thank you very much!
Apr
12
comment Recent posts in current category?
Edited my first post, I can't get it to work.
Apr
12
comment Recent posts in current category?
@Pat J That's from my single.php, it just gets the last 5 posts from the same category(s) as the current post being viewed. What I'd like to do is have the last 20 posts in the same category on category.php, in the sidebar.
Apr
1
comment Ajax loop in sidebar to load post titles/categories
Sorry for not making it more clear. My exact question would be "How do I add a button that users can click to load the next 20 posts with my loop via ajax?". I'm not quite sure what the exact error is from the link I posted, it just says HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. When I paste the "function my_AJAX_more_links_function(){ etc" into my functions.php it just gives the above error, so the page never loads at all.
Mar
8
comment Author_meta ONLY if it exists
EDIT - I'm an idiot, it does work, hehe. :)
Feb
26
comment strip last comma from get_the_category
Yeah, that's fantastic toscho, thanks! I prefer the second one, though it's not quite grammatically correct if it lists more than 3 categories. Since it says category, category, and category the last comma in that sentence shouldn't really be there.
Jan
29
comment Pagination for custom post type not working
I just changed next_posts_link to post (singular) and added 'archive' to the 'supports' array. Now it paginates just fine on the single page. Is that 'right' in technical sense?
Jan
29
comment Pagination for custom post type not working
It says 'posts' here. codex.wordpress.org/Function_Reference/previous_posts_link Why not create a new query for the portfolio posts? I'm not being sarcastic or anything, I really don't know, the WP codex seems geared towards people that are experts in php. And the template is one I made.
Jan
10
comment Display tags in list without link
Thanks! What are the fullstops on either side of the $tag->name for?
Dec
30
comment Post from one loop in different containers?
I edited the first post with my full code for the loop with yours included, it just gives me a server error.