iamharlan
Forum Replies Created
-
Thanks a ton. Here’s what I’ve got so far. Apologies, I’m a bit inexperienced with plugin development.
//Metabox for saving color of venue add_action('add_meta_boxes','my_add_metabox'); function my_add_metabox(){ add_meta_box('my_id','Venue Color', 'my_metabox_callback', 'event_page_venues', 'side', 'high'); } function my_metabox_callback(){ //Metabox's innards: $venuecolor = eo_get_venue_meta($venue->term_id, '_venue_color',true); //Remember to use nonces! wp_nonce_field( 'my_venue_meta_save', 'my_plugin_nonce_field' ); ?> <label>Color:</label> <input type="text" name="my_venue_color" value="<?php echo esc_attr($venuecolor);?>" > <?php } add_action ('eventorganiser_save_venue','my_save_venue_meta'); function my_save_venue_meta( $venue_id ){ //Check permissions $tax = get_taxonomy( 'event-venue'); if ( !current_user_can( $tax->cap->edit_terms ) ) return; //Check nonce check_admin_referer('my_venue_meta_save', 'my_plugin_nonce_field'); //Retrieve meta value(s) $value = $_POST['my_venue_color']; //Update venue meta eo_update_venue_meta($venue_id, '_venue_color', $value); return; }
This has created the metabox ok, but it doesn’t seem to be storing the value yet.
Once that’s working, I’ll add the filter below that code, and whatever I save in that metabox will then become the venue color for the calendar?
Thanks again!
Stephen…were you able to add this feature?
Yeah, that would be really helpful. I think that’s the only thing holding me back from this being the perfect plugin for our use.
Thanks!
Nevermind. It was the apostrophe in the line about “Fred’s” It’s fixed. Thanks a ton guys!
That’s looking like something I want…but I’m getting T-string errors. I’m thinking I need to wrap some of it in php tags…but I’m not exactly where. Anywhere I wrap it…I get the same errors.
The shortcode listed out all of the events. Not exactly what I was wanting.
However, the other option did get me started. It’s returning the post title only at the moment. How do I call the rest of the information? Like the date and time and the thumbnail, etc. I’m basically wanting everything I have on the single event page, with the exception of the content. Here’s what I have on that page…
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php echo get_the_post_thumbnail($id, 'large'); ?> <h1 class="entry-title"><?php the_title(); ?></h1> <div class="entry-meta"> <!-- Choose a different date format depending on whether we want to include time --> <?php if(eo_is_all_day()): ?> <!-- Event is all day --> <?php $date_format = 'F jS, Y'; ?> <?php else: ?> <!-- Event is not all day - include time in format --> <?php $date_format = 'F jS, Y g:ia'; ?> <?php endif; ?> <?php printf(__('<h2>%s</h2>','eventorganiser'), eo_get_the_start($date_format) );?> <?php if(eo_reoccurs()):?> <!-- Event reoccurs - is there a next occurrence? --> <?php $next = eo_get_next_occurrence($date_format);?> <?php if($next): ?> <!-- If the event is occurring again in the future, display the date --> <?php printf(__('This event is running from %1$s until %2$s. The next chance to catch it at Fred's is %3$s','eventorganiser'), eo_get_schedule_start('F jS, Y'), eo_get_schedule_last('F jS, Y'), $next);?> <?php else: ?> <!-- Otherwise the event has finished (no more occurrences) --> <?php printf(__('This event finished on %s','eventorganiser'), eo_get_schedule_last('F d, Y',''));?> <?php endif; ?> <?php else: ?> <!-- Event is a single event --> <?php endif; ?> </div><!-- .entry-meta --> <!-- The content or the description of the event--> <?php the_content(); ?> <?php endwhile; endif; ?>
Forum: Fixing WordPress
In reply to: Primary Div not showing up in ChromeYeah, I think I just ended up deleting the div and recreating it in a different way. I haven’t had the issue with any site I’ve developed since. Go figure.
That’s good to know for future reference though, thanks.
Forum: Plugins
In reply to: [RSSImport] [Plugin: RSSImport] Feeds not updatingWere you able to figure out how to get your feed to update hourly? Or did you give up on it?
I too would like to know how often the feed updates and if it’s possible to set that in a parameter. My site I’m pulling from updates usually once or twice a day, usually in the morning…so even if it checks once in the morning, that would be great.
Thanks!
Forum: Fixing WordPress
In reply to: Primary Div not showing up in ChromeAny thoughts?
Forum: Fixing WordPress
In reply to: Primary Div not showing up in ChromeI guess my site would help…
Forum: Themes and Templates
In reply to: Excerpts showing twice?Nevermind…the discrepancy was in my page code. It is solved.
Forum: Themes and Templates
In reply to: Excerpts showing twice?Oh…sorry.., obviously my question is…how do I get the duplicated excerpts to go away.
Any help would be appreciated! Thanks!
Forum: Themes and Templates
In reply to: Simple Category Page HelpAnyone?
Forum: Themes and Templates
In reply to: Simple Category Page HelpEDIT: I think I have it figured out now how to style them individually….but I have a new problem.
I have multiple posts in that category…but only have the title from one post showing up. The other post’s content is showing up, but not the title.
What’s up?
Here’s my code:
<div class="newspage"><?php query_posts('category_name=News&showposts=5'); ?> <?php the_post() ?> <div id="post-<?php the_ID() ?>" <?php post_class() ?>> <div class="newsposttitle"><strong><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </strong></div> <div class="newsposttext typeface-js" style="font-family: Helvetiker"> <?php the_excerpt() ?>
Forum: Themes and Templates
In reply to: For you designer junkies out there….Fair enough….is there a website or anything that has a script like this open source? I’m not very versed in Java…but can usually reverse engineer things fairly well.