|
I don't think so. The code for single-event.php is here: http://codetidy.com/272 EDIT: And the header file: http://codetidy.com/273 BuddytheRat fucked around with this message at 02:45 on Nov 8, 2010 |
# ? Nov 8, 2010 02:43 |
|
|
# ? Apr 28, 2024 03:35 |
|
What is the code that creates the custom post type?
|
# ? Nov 8, 2010 04:08 |
|
Here's the part of functions.php for the custom post type: http://codetidy.com/274
|
# ? Nov 8, 2010 04:17 |
|
You might need to change your permalink settings. I don't know if custom post types play well with id based permalinks. When you go from Admin does it take you to an id based url?
|
# ? Nov 8, 2010 06:21 |
|
Ned posted:You might need to change your permalink settings. I don't know if custom post types play well with id based permalinks. When you go from Admin does it take you to an id based url? Does the exact same thing with pretty permalinks as well. The custom post types have a post id and for the most part act exactly like posts. It feels like I've tried everything short of reinstalling wordpress.
|
# ? Nov 8, 2010 07:53 |
|
look into $wp_rewrite - it has some functions where you define a new permalink structure and associate it with your custom post type. try putting this in your function to create the event post type. code:
|
# ? Nov 8, 2010 08:11 |
|
Ned posted:look into $wp_rewrite - it has some functions where you define a new permalink structure and associate it with your custom post type. I think you forgot a few characters in there. (I fixed it.) Same exact thing. On the plus side, though, pretty permalinks are now working on my local server, which has never happened before. It works even without your code. Go figure. The permalinks without your code worked the same way when I tried it with pretty links earlier. (/event/event-name-here) I have no plugins activated. (Not even Akismet.) I did alter wp-comments-post.php slightly to fix a problem where comments were permanently closed for posts dated in the future, but it does the same thing with or without my edit. (I would love to know how to do this using a plugin, so I don't have to mess with core wordpress files.) code:
DOUBLE EDIT: So, I switched to pretty links, and then put in your code, and it was working again while logged in. So, I took out your code and.. it's still working while logged in, even though there is no actual difference in the code when it wasn't working a second ago and it working now. BuddytheRat fucked around with this message at 08:43 on Nov 8, 2010 |
# ? Nov 8, 2010 08:26 |
|
BuddytheRat posted:EDIT: I did notice something though. When I do use pretty permalinks, being logged in makes no difference and it still won't work. But using normal links, being logged in makes it work. I think the code just rebuilds the .htaccess file to set up the permalinks. If you remove that code but don't rebuild the permalinks then the .htaccess file is still the same. I'm not incredibly sure though because I'm still relatively new to custom post types myself. Want to set up a guest login for me? I'll poke around and see what I can see!
|
# ? Nov 8, 2010 09:23 |
|
Ned posted:I think the code just rebuilds the .htaccess file to set up the permalinks. If you remove that code but don't rebuild the permalinks then the .htaccess file is still the same. I'm not incredibly sure though because I'm still relatively new to custom post types myself. Sure! I've set up a new account. Username: "the_ned", password: "lljk". Just be sure to change that pass as soon as you login.
|
# ? Nov 8, 2010 09:33 |
|
I am in there and poking around. Very unusual situation here. I think one of the issues is that your events are scheduled and WP might not actually want to display content that is scheduled in the future unless we modify the call to get the post so I am looking into that on pages it knows are events.
|
# ? Nov 8, 2010 10:16 |
|
Ned posted:I am in there and poking around. Very unusual situation here. I think one of the issues is that your events are scheduled and WP might not actually want to display content that is scheduled in the future unless we modify the call to get the post so I am looking into that on pages it knows are events. Up until now the only problem I had relating to dealing with future posts was the comments. Once I hacked wp-comments-post.php tt worked perfectly up until a certain point. I don't know exactly what changed to make it do this suddenly, which is something that probably could have been avoided.. I guess I've learned the hard way that I need to save older versions as backups.
|
# ? Nov 8, 2010 10:23 |
|
It's alive!! I found your answer here: http://wptheming.com/2010/08/how-to-make-an-events-custom-post-type/
|
# ? Nov 8, 2010 10:36 |
|
Ned posted:It's alive!! Woah! That was fast. Thank you man, this is great! I guess I have a lot to learn. (And my google-fu could use some work, as well.) Seriously I can't thank you enough. I was tearing my hair out trying to figure this out. EDIT: And 'Schedule' now says 'Event Date'! That is way cool. BuddytheRat fucked around with this message at 10:51 on Nov 8, 2010 |
# ? Nov 8, 2010 10:46 |
|
BuddytheRat posted:Woah! That was fast. Thank you man, this is great! I guess I have a lot to learn. (And my google-fu could use some work, as well.) It was a very complex thing to put together on your own. The nice thing about WordPress is the people who develop WordPress usually start doing so because they are bloggers and if there is one thing bloggers like to write about it is about themselves and what they do. There are no shortage of answers out there but sometimes the documentation can be a bit lacking. Custom post types are also relatively new but the fact you added columns to the event type is great!
|
# ? Nov 8, 2010 10:53 |
|
Ned posted:It was a very complex thing to put together on your own. The nice thing about WordPress is the people who develop WordPress usually start doing so because they are bloggers and if there is one thing bloggers like to write about it is about themselves and what they do. There are no shortage of answers out there but sometimes the documentation can be a bit lacking. That little tidbit came from this guide, actually: http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/ I still don't entirely understand it all, but, I am learning by doing! I am way better at the CSS part.
|
# ? Nov 8, 2010 10:58 |
|
Working on a site where I'm doing a sub-theme of twentyten. It's 1/2 content (thousands of pages) and 1/2 blog. The sidebar will be the same across the whole site for the most part, but for blog pages I want to show archives, subscription links widgets and all that. The best way I can think of is putting all of the widgets I want to show everywhere in Widget Area 2, and the ones I want in just for post areas in Widget Area 1, then create a sidebar.php that detects if it's a page or a post and displays the widget areas accordingly. That seems more complicated than it should be though, is there a better way?
|
# ? Nov 8, 2010 19:30 |
|
How about something like this in page.php?php:<?php if ( is_page('blog') ) { ?> <?php include(TEMPLATEPATH.'/sidebar-blog.php');?> <?php } else { ?> <?php include(TEMPLATEPATH.'/sidebar.php');?> <?php } ?> I don't think there's anything wrong with the widget idea, but this is the way I've always done it. Edit: If you want the new sidebar to apply to single posts as well (when they drill down), I believe you can just change the sidebar call in single.php to get_sidebar(blog); since that function allows you to pass a string name. benitocereno fucked around with this message at 21:20 on Nov 8, 2010 |
# ? Nov 8, 2010 21:06 |
|
Here's two interesting posts by Roger Johansson on bending WordPress to your evil ways: - How to make WordPress URLs root-relative (very nice to know!) - Removing TITLE attributes from WordPress links (this quirk of WordPress' has always bugged me)
|
# ? Nov 8, 2010 22:36 |
|
stray posted:Here's two interesting posts by Roger Johansson on bending WordPress to your evil ways: Filters are pretty sweet. As a WP developer learning how hooks and filters work will make your life a lot easier. I like having title attributes in links though. They seem to help out with SEO or something.
|
# ? Nov 9, 2010 02:50 |
|
My plugin has the user uploading photos (specific to the plugin). I currently have them uploaded to a pictures directory within the plugin. Is this incorrect and should I just have it all uploaded to the uploads directory? Am I opening up some security concerns?
|
# ? Nov 9, 2010 20:37 |
|
Bringing my original question over from the Webdev thread, as I've decided since to use Wordpress. Please recommend to me some good plugins! Myself posted:I've got a final class project (web-media design course) for which I proposed the following: I'm using Wordpress as the structure here, and it isn't a big site by any means - no need for extreme 1000-user measures or anything. The first piece I need is a plugin that lets anonymous visitors post. Atop that, I need a plugin that lets visitors authorize with Facebook or Twitter and then post. The posts themselves are audio or video - how easily can Wordpress handle that? I'd love to find something like Facebook's feature that lets you record video with your webcam right in the submit page.This is the tough one, I think. TL;DR: In a nutshell, what I need is to let anyone looking at the site/blog post video to it, with the option of just giving their name, or if they have a Twitter/Facebook account, logging in with that. Any plugin recommendations? I'm a Wordpress noob and there's so many plugins out there to wade through. Stuntman Mike fucked around with this message at 02:25 on Nov 10, 2010 |
# ? Nov 10, 2010 00:29 |
|
Doh004 posted:My plugin has the user uploading photos (specific to the plugin). I currently have them uploaded to a pictures directory within the plugin. Is this incorrect and should I just have it all uploaded to the uploads directory? Am I opening up some security concerns? I'd try to put them in the uploads directory. If they uninstall the plugin do they lose those images?
|
# ? Nov 10, 2010 04:31 |
|
Doh004 posted:My plugin has the user uploading photos (specific to the plugin). I currently have them uploaded to a pictures directory within the plugin. Is this incorrect and should I just have it all uploaded to the uploads directory? Am I opening up some security concerns? Yeah, I'd put them in the uploads directory if at all possible. Did you make this plugin or are you using something like Photosmash Galleries?
|
# ? Nov 10, 2010 06:52 |
|
Ned posted:I'd try to put them in the uploads directory. If they uninstall the plugin do they lose those images? Lareous posted:Yeah, I'd put them in the uploads directory if at all possible. Did you make this plugin or are you using something like Photosmash Galleries? Made the plugin from scratch. I had thought about using the built in WP uploading functionality; however, I have a fair amount of experience of image uploading and manipulation with PHP, so I was comfortable enough to build it in.
|
# ? Nov 10, 2010 07:05 |
|
Stuntman Mike posted:TL;DR: Do it by hand. Unless it is some low level BS class I think the goal of this assignment is to get you to learn how to develop the concepts, not integrate them. Otherwise everyone would turn in a WordPress install with a bunch of plugins.
|
# ? Nov 10, 2010 10:31 |
|
Ned posted:Do it by hand. Unless it is some low level BS class I think the goal of this assignment is to get you to learn how to develop the concepts, not integrate them. Otherwise everyone would turn in a WordPress install with a bunch of plugins. On the contrary, integrating the concepts is the primary goal. This is pretty ambitious for the class and I'm allowed to use existing plugins, etcetera to complete it. I've got no previous PHP or similar experience so I need all the help I can get. I've got a fallback plan if I can't make this work, but I'd like to give it a shot.
|
# ? Nov 10, 2010 18:14 |
|
Stuntman Mike posted:Any plugin recommendations? I'm a Wordpress noob and there's so many plugins out there to wade through. Something like TDO Miniforms maybe?
|
# ? Nov 10, 2010 23:03 |
|
I am trying to sort posts by a date held in a custom field using this plugin: http://matth.eu/wordpress-date-field-plugin The only problem is when I try to actually query the posts, and arrange them by this custom value. I am using the code suggested by the plugin developer. code:
|
# ? Nov 11, 2010 04:04 |
|
You probably need to shove the post_status in there too.
|
# ? Nov 11, 2010 06:08 |
|
Ned posted:You probably need to shove the post_status in there too. No deal. It works fine until I add in the meta_value stuff.
|
# ? Nov 11, 2010 07:30 |
|
I'm about to take on a client which will probably be my biggest Wordpress site yet. Specifically, it's a magazine publisher with lots of archived issues, each of which has a column. Anyone have experience working with a publisher and organizing their content in Wordpress?
|
# ? Nov 11, 2010 23:24 |
|
Strict 9 posted:I'm about to take on a client which will probably be my biggest Wordpress site yet. Specifically, it's a magazine publisher with lots of archived issues, each of which has a column. Anyone have experience working with a publisher and organizing their content in Wordpress? There are plugins to import well-formed HTML pages into Wordpress, if that's what you're looking for? I haven't used one (At the day job, I'm working on importing content from a magazine's old HTML site into Wordpress, but their HTML wasn't "well=formed" by any stretch so it's manual and taking forever), but there are a few in the plugins directory that review well.
|
# ? Nov 12, 2010 01:28 |
|
Strict 9 posted:I'm about to take on a client which will probably be my biggest Wordpress site yet. Specifically, it's a magazine publisher with lots of archived issues, each of which has a column. Anyone have experience working with a publisher and organizing their content in Wordpress? I was the main WP person at Time Inc so I have some experience with this stuff.
|
# ? Nov 12, 2010 01:59 |
|
I'm starting a how-to blog, which is more for getting my hands dirty with blogging than for creating any cash flow, but I'd like a few suggestions for basic, clean, seo-friendly themes that I can build upon as I learn what it is I want to do with this site.
|
# ? Nov 12, 2010 23:02 |
|
Nothing wrong starting with Twenty Ten theme + the All in One SEO plugin
|
# ? Nov 12, 2010 23:20 |
|
I figured I'd take a stab in the dark here... On our company website, we're using something called "Sticky Image" to glue images to the posts, so essentially each post has a title image. However, it doesn't seem to have been updated in years, the authors website doesn't mention it, and all I can find is a handful of forum posts regarding it. Hell, I can't even find someone using the same version we are. Everyone else seems to be a version behind (1.31 vs 1.32) Anyway, ever since we upgraded wordpress, it doesn't seem to upload the images correctly. I've done some debugging and can kind of see what's going on, but I don't want to hack it up too much because I'd rather just replace it with something supported. Is there any chance that there's a similar working plugin, or newer builtin functionality that can take what already exists and reuse it, or something that is easy to convert the existing data to.
|
# ? Nov 13, 2010 08:16 |
|
Serfer posted:Is there any chance that there's a similar working plugin, or newer builtin functionality that can take what already exists and reuse it, or something that is easy to convert the existing data to. There is functionality called post thumbnails that was introduced in 2.9 that you probably want to incorporate with your theme. Basically you put a piece of code in your functions.php and you get a box on the right of each post/page in the admin that allows you to select an image from the media library. code:
code:
|
# ? Nov 13, 2010 08:53 |
|
Ned posted:There is functionality called post thumbnails that was introduced in 2.9 that you probably want to incorporate with your theme. Ok, that sounds perfect, but, what about the older posts? Is there a way to integrate the already existing data with this?
|
# ? Nov 13, 2010 17:22 |
|
Serfer posted:Ok, that sounds perfect, but, what about the older posts? Is there a way to integrate the already existing data with this? The short answer is no. The long answer is yes. Basically you have to check if the post has a thumbnail associated with it. If it doesn't, do it the old way, otherwise, do it the new way. You can always parse the content of old posts and pull out the first image.
|
# ? Nov 13, 2010 22:33 |
|
|
# ? Apr 28, 2024 03:35 |
|
Try this plugin: http://wordpress.org/extend/plugins/regenerate-thumbnails/
|
# ? Nov 13, 2010 22:54 |