How to disable “Audio Player” to show up on the main page

The simplest solution would be to put the audio player after the read-more link. If that would prove cumbersome (e.g. you’ve already got too may posts with audio players), you could try hooking into the the_content filter, and remove the audio player if not on a single-post view. e.g.: function mytheme_remove_audio_player_from_home( $content ) { // … Read more

Displaying cf post formats with oembed

<?php if (strstr($audio, ‘<iframe’)) { echo $audio; } else { echo wp_oembed_get( get_post_meta($post->ID, ‘_format_audio_embed’, true) ); } ?> Of course, this would require that you get the custom field with the audio embed code or url into $audio 🙂 Edit – try: <?php $audio = get_post_meta($post->ID, ‘_format_audio_embed’, true); if (strstr($audio, ‘<iframe’)) { echo $audio; } … Read more

How to fetch all videos in custom page which uploaded in wp-admin (Media) in wordpress

Uploaded images, video’s etc. are stored as posts with the type “attachment”; use get_posts( ) with the right parameters. Try this; the code loops trough all attachments and displays them: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => null, // any parent ‘post_mime_type’ => ‘YOUR-POST-MIME-TYPE’ ); $attachments = get_posts( … Read more

WordPress Background Audio – Continous AutoPlay

Since I don’t have enough reputation to add a comment yet, I read on another website that someone used http://scmplayer.net/ as an alternative to frames/popups which seems to be a little script you can generate and then use on both non-WordPress and WordPress sites (since it just needs to be inserted after the <body> tag). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)