Use this:
function MostVotedAllTime_Widget() {
$a = SortVotes();
//Before
?>
<div class="JibbleChart">
<div class="title">Most Recommended Albums</div>
<?php
$rows = 0;
//Now does not include deleted posts
$i = 0;
while ($rows < get_option('voteiu_widgetcount')) {
if ($a[0][$i][0] != '') {
$postdat = get_post($a[0][$i][0]);
if (!empty($postdat)) {
$rows++;
if (round($rows / 2) == ($rows / 2)) {
echo '<div class="fore">';
} else {
echo '<div class="back">';
}
echo get_the_term_list( $postdat->ID, 'artist', ' ', ', ', '' );
echo ' - <a href="'.$postdat->guid.'" title="'.$postdat->post_title.'">'.$i.' - '.$postdat->post_title.'</a>';
echo '</div>';
}
}
if ($i < count($a[0])) {
$i++;
} else {
break; //exit the loop
}
}
//End
?>
</div>
<?php
}
Related Posts:
- How can I use WordPress functions in my stylesheet?
- Customizing subject in comment notification e-mails
- WP showing “warning: call_user_func_array()”, What to do?
- How can I pass a variable to wp_ajax action?
- How can i change an image’s author?
- Creating search filter through plugin
- WP-Members redirect if member ALREADY logged in
- How to edit/delete single row items in a table on my own menu page
- Displaying Gravity Form data on WordPress page [closed]
- Get a list of galleries from an album in NextGEN Gallery [closed]
- Undefined property: WP_Post_Type::$ID
- Plugin exceeds memory limit
- Pass a php string to a javascript variable
- Show price with Geo IP location
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- How to generate video out of images via WordPress plugin
- Preferred way of cacheing a value in php
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Automatically add attributes to woocommerce product?
- Edit Yoast SEO breadcrumbs output [closed]
- Adding a slider captcha to the comment system
- How to put JQuery/Ajax inside shortcode?
- Query all customers/users and check for duplicate information
- WordPress function not being called from jQuery method
- How can I add hyperlink in WP_Error message?
- WordPress WPforms customization
- wp_remote_get() returns 403 while file_get_contents() does not
- Where these .js file come to source code?
- WordPress Widget Not Saving Data
- Center and hide overflow of WP toolbar custom links
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- How I can internationalize variables within the function _e () __ (), etc?
- Conditional tag doesn’t work in WordPress plugin
- How to delete all trashed item in one-go
- How can i force wp-admin to use 2-column dashboard layout? [closed]
- WordPress Related Plugin – only show when related content
- Are there action hooks for comments?
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Plugin onclick button activate other plugin
- Show icons or badges under title on product archives/category pages
- How to redirect non www to www? [closed]
- WordPress custom post type image in RSS
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Add logo to admin menu in my plugin
- Plugin not working locally, but works on server
- Disable Checkbox depending on state of another checkbox
- Get data from wp_posts of mysql in to variables of wordpress-php script
- WordPress plugin won’t create custom tables
- Trying to get property of non-object wordpress error message
- Advertising: Every page refresh counts as 3 ad impressions
- Somehow adding to “Insert Into URL” posts are contradicting each other
- Pasting this PHP breaks my page. Why?
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- WordPress Cache delete on plugin uninstall
- How to create repeater field manually, without plugin (ACF Pro)?
- can’t unzip file
- Woo-commerce Update price as a Bulk from My offline software export
- How to disable login in iframe which is hosted in same domain?
- Display Author name PHP (Selfmade Plug-IN)
- Display top level parent category as a single product body class (Woocommerce)
- Allow a particular user to access a particular plugin?
- Auto delete empty posts
- Change plugin descriptions
- How do I use a plugin’s shortcode attribute value in another function?
- Change the address of the music player if not available
- WordPress hide post from custom post-type on a single page
- How can I find related learndash course id from woocommerce product object?
- update_post_meta is not working for me when I use e.preventDefault for update button
- Try to debug a plug-in written by someone else
- How to use Datatable with Ajax when creating plugin on WordPress?
- Use modulo condition in ACF repeater Field
- Add a WooCommerce Product Variant with attributes programmatically
- Showing how many times is plugin activated or deactivated
- Site broken by unedited php?
- get/show Last ID
- Help with customising love it plugin (use within foreach)
- Plugin communication between sites that use it?
- Form tries to download a file on submit
- insert multiple entries in database using a loop issue
- Query Shortcode from a multisite to appear on a different site?
- Retrieve data from multiple WordPress sites using PHP script
- Trending Tags based on post views
- What is the process for reimplementing a back up WordPress?
- Showpost and last
- date function not correctly returning date
- Edit Buddypress Groups Activity Page Text [closed]
- Plugin use of ajax/jquery depending dropdown
- Unable to show 4 products in a row
- Meta Box plugin image_advanced not showing up on frontend
- Creating Features List in WordPress Post
- WordPress portfolio pagination on home page
- PHP Creating a formula from mysql db values and db stored math operator
- Function not being called on form submit, only blank admin-post.php page
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Convert queries to slashes using function.php
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database