MikePayne
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [Plugin: All In One Event Calendar] How to add shortcode manuallyAfter further analysis, I’ve discovered the styles are importing, but the entire ai1ec-container is being wrapped in pre tags. . . curiouser and curiouser.
Forum: Fixing WordPress
In reply to: [Plugin: All In One Event Calendar] How to add shortcode manuallyFor me, it’s displaying the content of the calendar, but the styling is all messed up (yes, i imported the CSS file). And the cat parameter doesn’t seem to work.
take off the <>s.
it should just be [menu-949], although I would suggest changing that to state or email for clarity.
Forum: Plugins
In reply to: [WP Customer Reviews] Random Review Widget?@solvid: I haven’t seen one, but the code above will do that if you remove the randomize parameter from the $wpdb call.
@bompus sounds good, I saw that there was an update recently, but didn’t check into it at all. BTW, the function you have in there to send yourself data about the sites is very black hat. I would suggest taking it out. As is, I remove it from sites I install it on before I activate it.
Forum: Plugins
In reply to: [WP Customer Reviews] Random Review Widget?ok, so i figured out a solution (maybe not the best, but it works). i created a widget with the following code to retrieve the data directly from $wpdb.
global $wpdb; $testimonial = $wpdb->get_results('SELECT * FROM wp_wpcreviews WHERE status=1 ORDER BY RAND() LIMIT 1 '); echo "<h2>Testimonials</h2>"; echo "<div class=\"testimonial\"><strong>" . $testimonial[0]->review_title . " - " . $testimonial[0]->review_rating . "/5</strong><br />\n"; echo "\"" . $testimonial[0]->review_text . "\"<br />\n"; echo "-" . $testimonial[0]->reviewer_name . "\n"; echo "</div>\n";
** Note: this was set as a widget and placed in a widgetized area. It could not be used as a shortcode. **
It gets a row with a status of 1 ( 0 = unapproved, 1 = approved, 2 = trash ) containing a stdClass object as the first element in an array sorted by random and limited to just one row.
the object contains:
id
date_time
reviewer_name
reviewer_email
reviewer_ip
review_title
review_text
status
review_rating
reviewer_url
page_id
custom_fieldsHope this helped anyone else with similar needs.