Bandcamp instead of Soundcloud #948
Answered
by
danpros
usernameit
asked this question in
Q&A
|
How do I make audio posts to link and show Bandcamp audio player instead of Soundcloud? I know I need to make the change in functions.php but I just don't know how to phrase it, if it makes any sense (I'm not a coder). Any help would be greatly appreciated. Thanks! |
Answered by
danpros
Aug 3, 2025
Replies: 1 comment 1 reply
|
Hi, You don't need to change For example, if you use <?php if(!empty($post->audio)):?>
<iframe width="100%" height="200px" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $post->audio;?>&auto_play=false&visual=true"></iframe>
<?php endif;?>Change it to (use the example embed code from bandcamp): <?php if(!empty($post->audio)):?>
<iframe style="border: 0; width: 350px; height: 470px;" src="<?php echo $post->audio;?>" seamless></iframe>
<?php endif;?>Later in your post, just fill in the featured field with the Edit: And keep in mind that htmly text editor also accepts html tags so you can also just paste the embed code directly in the editor |
1 reply
Answer selected by
usernameit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
You don't need to change
functions.php, just change your theme template file:main.html.phppost.html.phpandprofile.html.phpFor example, if you use
dokstheme you will find below code inpost.html.phpChange it to (use the example embed code from bandcamp):
Late…