AJ
Forum Replies Created
-
I also made a template to do this with some additional features. For the first (x) top events this will show the full content, custom class, and a featured image.
The shortcode:[eo_events showpastevents=false]
The template:
<?php global $eo_event_loop,$eo_event_loop_args; //Date % Time format for events //Custom date format to display like this: Saturday, May 10, 2013. $date_format = 'l, F j, Y'; $time_format = get_option('time_format'); //The list ID / classes $id = $eo_event_loop_args['id']; $classes = $eo_event_loop_args['class']; ?> <?php if( $eo_event_loop->have_posts() ): ?> <ul id="<?php echo esc_attr($id);?>" class="<?php echo esc_attr($classes);?>" > <?php while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post(); ?> <?php //Count how many times the loop has gone around too use for adding 'content' to first entry. $counter++; ?> <?php //Generate HTML classes for this event $eo_event_classes = eo_get_event_classes(); //For non-all-day events, include time format $format = ( eo_is_all_day() ? $date_format : $date_format.' '.$time_format ); ?> <li class="<?php echo esc_attr(implode(' ',$eo_event_classes)); //add custom class 'up-and-coming' to the desired number of events. if($counter < 2) : echo (' up-and-coming') ; endif; ?>" > <a href= "<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > <?php the_title();?> </a> <?php echo __('on','eventorganiser') . ' '.eo_get_the_start($format); ?> <?php //If it has one, display the thumbnail if (has_post_thumbnail()) { ?> <a href= "<?php the_permalink(); ?>"> <?php the_post_thumbnail('thumbnail', array('class'=>'img-up-coming'))?> </a> <?php } ?> </li> <?php // Conditional output to show full content for desired number of events and regular bullet list for the rest, or uncomment the else stement to use the excerpt. if($counter < 2) : the_content(); //else: the_excerpt(); endif; ?> <?php endwhile; ?> </ul> <?php elseif( ! empty($eo_event_loop_args['no_events']) ): ?> <ul id="<?php echo esc_attr($id);?>" class="<?php echo esc_attr($classes);?>" > <li class="eo-no-events" > <?php echo $eo_event_loop_args['no_events']; ?> </li> </ul> <?php endif; ?>
… and a little css:
li.up-and-coming{ font-size: 18px; margin-bottom: 10px; font-weight: bolder; list-style-type: square; } li.up-and-coming a{clear:left;} #content .img-up-coming {margin-top:10px;} li.eo-event-future{clear:left}
Figured it out.
The following shortcode will list events like this:
Upcoming events with a linked title on Saturday, June 15, 2013. Venue.
EXCERPT[eo_events showpastevents=false] <a href="%event_url%">%event_title%</a> on %start{l, F j, Y}%. %event_venue% %event_excerpt{30}%[/eo_events]
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 subscribe to wysiga newsletter on submitHi.
I realized in the version of code that I posted some of the original functions were duplicated resulting in the error that you mentioned.The version you posted is the correct code and all that is needed.
I don’t have an answer to your other question. It’s working fine on my site as it is.
An else statement shouldn’t be needed.
Your theme may have a different tag for the main content section. Try removing the #content and just leave: img.ngg-singlepic.
I can’t post a link because the site is in development.
But here is the source for the css with a demo: https://css-tricks.com/perfect-full-page-background-image/
Forum: Plugins
In reply to: [MP3-jPlayer] html link to mp3 j-player popupIf anyone figures out how to do this please post!
Forum: Themes and Templates
In reply to: [Ilisa] Disable the Custom Color option in Ilisa themeI disabled the entire theme options section by commenting out the line where it includes the theme-options in the functions.php file. Not sure if there is a better way, but now I have full control of the links via css.
// Load up the theme options page // require ( get_template_directory() . '/includes/theme-options.php' );
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 subscribe to wysiga newsletter on submitCool, simpler solution.
I haven’t tested this, but you should be able to add another string for last name, as long as it matches the one in the wisija database.
SO, instead of this:
/* 'your-name' and 'your-email' are from the default template change them to match the ones you use in your form. */ $user_name = $formdata['your-name']; $user_email = $formdata['your-email']; /* Insert the list id # you want the user to be subscribed to. The default list id is 1. This can be an array if you have more than one list. Example: $listID = array( '1,2' ); */ $listID = array( '1' ); $userData=array( 'email' => $user_email, 'firstname' => $user_name );
Add the last name string:
/* 'your-name', 'your-email', 'your-lastname' << change the identifier to match the ones you use in your cf7 form. This section gets the data from your form and stores it an a string. */ $user_name = $formdata['your-name']; $user_email = $formdata['your-email']; $user_lastname = $formdata['your-lastname']; /* Insert the list id # you want the user to be subscribed to. The default list id is 1. This can be an array if you have more than one list. [Example: $listID = array( '1,2' );] */ $listID = array( '1' ); /* The $userData=array forms the $string data from cf7 by connecting it to the appropriate wysija database table. */ $userData=array( 'email' => $user_email, 'firstname' => $user_name, 'lastname' => $user_lastname );
Forum: Plugins
In reply to: [NextGEN Custom Fields] want to use shortcode of 1 pluign in other… almost working but having issues. (resolved)
In the ‘additional-info’ field for each image, created with your plugin I have this shortcode:
[mp3-popout tracks=”FEED:/music/home/mp3″] (mp3 jplayer plugin)I also had added the same mp3 shortcode onto the page itself, just to make sure the code works.
Like this:
[nggallery id=1 template=wp-eStore]
[mp3-popout tracks=”FEED:/music/home/mp3″ ] (It does work.)In my wp-eStore template for the nextgen gallery I added the following code after the ‘caption’ in the foreach loop:
<?php echo $image->ngg_custom_fields[“additional-info”]; ?>
<?php echo do_shortcode($image->ngg_custom_fields[“additional-info”]); ?>The problem is that the shortcode is first printed exactly like this: [mp3-popout tracks=”FEED:/music/home/mp3″] (not parsed),and just below it is the parsed mp3 player popout icon.
But, when I remove the test shortcode that I had added from the page itself (The player appears at the bottom of the page.), it stops parsing in the ‘additional-info’ field also.
I’ve tried different variations.
If I call the ngg_custom_field like this without the echo,
<?php $image->ngg_custom_fields[“additional-info”]; ?>, it removes the unparsed shortcode.But I can not get it to parse in the ngg custom field without also adding it to the bottom of the page.
—
Ok, I figured it out and am going to post in case it helps someone else. Its not a problem with the custom field plugin, but that my mp3 player plugin was not inserting its javascripts on the page unless it was included in the page itself. The mp3 plugin must be watching page content and selectively inserting the javascripts on pages that call its shortcode. I just have to selectively call the right javascripts on the gallery page and it works.Forum: Plugins
In reply to: [NextGEN Custom Fields] want to use shortcode of 1 pluign in otherThanks for this, have been searching everywhere.
I was trying to add an mp3 player shortcode inside the custom field of nextgen gallery.
Thanks for the tip on using the text widget to add the cart via shortcode and hide the title.
I wanted the cart to always display on store page and on the rest of the site only when something was in the cart. I used the per page widget, and put the shortcode in a text widget with no title on every page but the store page… it works!