Skip to content

Instantly share code, notes, and snippets.

Romeo456-wq / gist:124ba832849cf777de90b720d1426839
Created December 25, 2023 14:36
To add a star rating below the download button in all posts of your WordPress website
// Add star rating below download button
function add_star_rating_below_download_button() {
// Get the post ID
$post_id = get_the_ID();
// Get the rating for the post (you should replace this with your own rating logic)
$rating = get_post_meta($post_id, 'custom_rating_meta_key', true);
// Output the HTML for the star rating
echo '<div class="star-rating">';
Romeo456-wq / gist:fb4e19f0c798e9974c197831b74a025c
Created September 3, 2023 16:50
Affiliate Product Price Comparison Table Generator
<!DOCTYPE html>
<title>Affiliate Product Price Comparison Table</title>
table {
border-collapse: collapse;
width: 80%;
margin: 20px auto;