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

How to reduce repetitive code

You can define your own custom functions in PHP just like you would in JavaScript. Here’s your code example rewritten using a function: $page = get_page_by_title(‘Excerpts Showreel’); <– This piece of code will change // the code below will never change. function get_my_content( $page ) { $my_id = $page; $post_id = get_post($my_id, ARRAY_A); $title = … Read more

Custom select box meta field

To save post meta fields from custom meta boxes you need to hook into save_post with something like this: add_action( ‘save_post’, ‘myplugin_save_postdata’ ); There is some full example code on adding meta boxes on the codex Function Reference/add meta box

Why is Posts page selected when showing single Custom Post Type?

Might be worth looking at the Codex for registering a post type, the rewrite rule should help: http://codex.wordpress.org/Function_Reference/register_post_type rewrite (boolean or array) (optional) Rewrite permalinks with this format. False to prevent rewrite. Default: true and use post type as slug $args array ‘slug’ – prepend posts with this slug – defaults to post type’s name … Read more

menu in different page in different style

you can use this, <?php if( is_front_page() ):?> <div class=”home-page-menu”> wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); </div> <?php elseif; ?> <div class=”inside-page-menu”> wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); </div> <?php endif; ?> Here, you should be change your CSS style for home-page-menu and inside-page-menu . for more … Read more

Where do you upload images on a wordpress site?

WordPress images are stored in your wp-content/uploads folder no need for storing in the database, only the img uris get stored there. When you create an new wordpress post or page with your text editor you will notice several icons above it, use the first one to upload images and it will give you the … Read more