cpkid2
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: query_posts not showing the posts…Please disregard my previous message. I realize I was a bit vague. To clarify what I mean:
Here is what I currently have set up in archive.php:
https://wordpress.pastebin.com/01dEvDCeAnd here is what I currently have set up in a custom template called “Videos” (videos.php):
https://wordpress.pastebin.com/28LpD68jI’m querying posts with “$query_string” because WP-PageNavi doesn’t work without it. However, the strange thing is the posts show up fine on archive.php, however, nothing shows up in videos.php. What could be the reason?
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Nevermind, I got it.
<?php simple_popup_link('https://www.sitename.com/_lyrics/'.$song_lyrics.'.txt','Lyrics'); ?>
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Thanks.
I hate to keep bugging you but could you see what’s wrong w/ the line below? I can’t get the $song_lyrics to display its value. It just outputs as “$song_lyrics”.
echo "<td class='lyrics'>"; ?><?php simple_popup_link('https://www.sitename.com/_lyrics/$song_lyrics.txt','Lyrics'); ?><?php echo "</td>";
<?php // Start the table echo '<table id="discography-table"><tr><th>Title</th><th>Listen</th><th>Lyrics</th><th>Price</th><th>Buy</th></tr>'; foreach ($song_values as $song) { list( $song_title, $song_listen, $song_lyrics, $song_price, $song_buy) = explode(';',$song); // Add a row to the table and insert the data echo '<tr>'; echo "<td class='title'>$song_title</td>"; echo "<td class='listen'><a href='$song_listen' target='_blank'>Listen</a></td>"; echo "<td class='lyrics'>"; ?><?php simple_popup_link('https://www.sitename.com/_lyrics/$song_lyrics.txt','Lyrics'); ?><?php echo "</td>"; echo "<td class='price'>$song_price</td>"; echo "<td class='buy'><a href='$song_buy' target='_blank'><img src='/wp-content/themes/sitename/images/cart.png' /></a></td>"; echo '</tr>'; } // End the table echo '</table>'; ?>
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Thank you. Do you know if it’s possible to output a custom field value in another page other than the one it was created for? For example, if I wanted to show the price on another page, can I just use the value I created for the album page?
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Sorry, one more question. If I wanted to add a column for “Lyrics” and have each link in that column pop up in a new window, how would I go about doing that? I can add the column. I just don’t know how I would make each link pop up in a small window to display the lyrics.
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Yes! Thank you. Styling is something I can easily take care of. Thank you!
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?Hey thanks vtxyzzy. Here are the answers to your questions.
1) Yes, the rest of the site is already built with a theme.
2) Each album will be a post. Yes, a custom post type called “Discography” which I already have set up.So, I added a custom field called “Song” with the value “Have A Blue Funk;https://listensite/link/;12.34;https://purchasesite/link/”
In the custom template (single-discography.php), this is how I have it set up:
<?php get_header();?> <div id="main"> <div id="content" class="grid_8 alpha"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $song_values = get_post_meta($post->ID, 'Song', false); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="title-border"></div> <div class="entry"> <?php the_post_thumbnail(); ?> <?php the_content(); ?> <?php // Put code here to start the table foreach ($song_values as $song) { list( $song_title, $song_listen, $song_price, $song_purchase) = explode(';',$song); // Put code here to add a row to the table and insert the data } // Put code here to end the table ?> </div> </div> <?php endwhile; endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
However, nothing is showing up. Sorry for my ignorance but I guess I have to put in something for the comments “// Put code here to start the table”, “// Put code here to add a row to the table and insert the data”, and “// Put code here to end the table”?
I tried putting in <table><tbody>, <tr>, and </tbody></table> respectively but I couldn’t get it to work.
Forum: Fixing WordPress
In reply to: custom fields for song titles -> display as table?For example, I want the output would look something like this in a table:
title | listen | price | purchase
song1 | listen link | $.99 | purchase link
song2 | listen link | $.99 | purchase link
song3 | listen link | $.99 | purchase linketc..
So I guess it would be multiple per song? I’m not sure…
Forum: Fixing WordPress
In reply to: creating a discography w/ taxonomiesThanks, Michael, for your generous support. However, I failed to mention this but I actually am trying to achieve this without the use of a plugin. I have too many installed as it is and wherever I can try to cut down some I make the effort even if it might take a bit more extra work. So far, the best reference I came across for this was Justin Tadlock’s tutorial here: https://bit.ly/cCiwJF. I’ve read over it a few times but I’m still trying to grasp the concept.
Anybody?
Forum: Fixing WordPress
In reply to: text replacement for youtube video embeds in post excerpts?Just bumping this because I still can’t figure it out.
Forum: Fixing WordPress
In reply to: text replacement for youtube video embeds in post excerpts?@t310s_
I just plugged the two codes in the functions and index files respectively and nothing is showing in the excerpts. Any ideas?
Forum: Fixing WordPress
In reply to: Any way to add a facebook login option to WordPress comments?I checked out the plugin and from the second link you provided, it states that it doesn’t work with WP Super-Cache. Unfortunately, I need WP Super-Cache for this site I’m building since it will be getting a ton of hits. Do you know of any other way?
Forum: Fixing WordPress
In reply to: Comment pagination not showing on Single pagesActually, I just figured it out (I think).
I noticed that this works:
<?php paginate_comments_links() ?>
But the pagenavi plugin doesn’t. I visited the plugin author’s site and he mentions that the plugin doesn’t paginate comments.
So problem solved.
Forum: Fixing WordPress
In reply to: Comment pagination not showing on Single pagesStill having problems with this one. Can someone take a look?
You can see here that there are 88 comments (at time of posting) but there’s no way to go to the second page due to the missing navigation.
I’ve tried deactivating all plugins. I’ve tried omitting the custom functions I have set up. Nothing. Any ideas?