5 reputation
3
bio website
location
age 25
visits member for 6 months
seen Oct 11 '13 at 15:55

Junior Developer www.purpleclaw.co.uk


Oct
11
comment Active class to current link
You are quite right recent work is a static page. However music, commercial, promo etc are post types but they are using template files is this wrong? For the custom post types should I be using single-CPT.php instead of template-CPT.php
Oct
11
comment Active class to current link
purpleclaw.org.uk/lulu - Link to the site
Oct
11
comment Active class to current link
I have read through the codex but everything I try for the custom post types isnt working. The custom post types are in the main nav and then they are sub-nav items. I have viewed the source code and found that wordpress is assigning the following class to the current post type page: menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-133 current_page_item menu-item-137
Oct
11
comment Active class to current link
Thanks @chip Ive realised that for the page items in my navigation the class being applied by wordpress is: li.current-menu-item and so I can style those ones as I please, however for the custom post types I cant figure out which class wordpress is assigning which is making it difficult to style them.
Oct
11
comment Active class to current link
thanks that worked for pages but when I click on the custom post types in the nav menu it doesnt work.
Oct
4
comment display all posts in current category
ok thanks i will give it a try.
Oct
4
comment Assigning the same custom meta box to multiple post types
$posttypes is taking the arguments that are in the array. I added my custom post types where it says 'type1' 'type2' and then as far as I know its looping through each custom post type and displaying my meta box in each post type so that users can add the video ID for the video post type as well as the music post type. Which is then displayed on the front end.
Oct
4
comment display all posts in current category
Sorry to be a pain but could you show me how this would fit into my code? I'm not sure where I need to add the code you suggested. Many thanks.
Oct
4
comment Assigning the same custom meta box to multiple post types
Thank you @kalymaStudio I added the code you suggested and changed the type1, type2 items to be my custom post types and it works!
Oct
4
comment display all posts in current category
I would like to display all posts on the single-custom-post-type.
Sep
27
comment Displaying information from custom field on custom post type
Thank you @cybnet for pointing this out - somehow I have managed to adjust my loop and now when I click on commercial it displays the correct video and it isnt dumping all the other videos out that are associated with the other categories in my post type (like it was). Appreciate your help. Thanks again.
Sep
27
comment Displaying information from custom field on custom post type
I have added the full function for you (:
Sep
27
comment Displaying information from custom field on custom post type
Oops sorry @cybnet will bear this in mind for future. I have added the function that stores the custom fields value into my question.
Sep
27
comment Displaying information from custom field on custom post type
@anjum this is a custom taxonomy (i think) here is the code that generates the custom post type and the category: ` // V Custom Post Type add_action( 'init', 'create_videos' ); function create_videos() { register_post_type( 'videos', array( 'labels' => array( 'name' => __( 'Videos' ), 'singular_name' => __( 'Video' ) ), 'public' => true, 'taxonomies' => array("category"), 'has_archive' => true, 'supports' => array( 'title', 'editor', 'thumbnail' ), ) ); }`
Sep
27
comment Displaying information from custom field on custom post type
Thanks @cybnet I tried your suggestion but I still have an issue where every single video I add is displayed - wordopress is ignoring the fact that I want commercial videos posted with the commercial category and music videos posted with the music category. My loop is incorrect because it is not working the way I want it to.
Sep
25
comment How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
Im viewing it in single-videos.php: <div class="page-content"> <?php global $post; if (get_post_meta($post->ID, 'my_video_type', true) == "youtube") { echo do_shortcode('[youtube id="'.get_post_meta($post->ID, 'my_meta_box_text', true).'"]'); } if (get_post_meta($post->ID, 'my_video_type', true) == "vimeo") { echo do_shortcode('[vimeo id="'.get_post_meta($post->ID, 'my_meta_box_text', true).'"]'); } ?> </div>
Sep
25
comment How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
Still not displaying any videos :(
Sep
25
comment How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
I cannot add the videos id in the shortcode because this will not always be the same it will be different each time Video Short code :function wp_youtube_video($atts) { extract(shortcode_atts(array( 'id' => '' ), $atts)); return '<iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/'.$atts['id'].'" frameborder="0" allowFullScreen></iframe>'; } add_shortcode('youtube', 'wp_youtube_video');
Sep
25
comment How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
I dont want it to return the video id I want it to display the video in the front end when the user enters the id in the meta box. I want wordpress to display the video once the id has been entered.
Sep
25
comment How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
Thanks. I do have a custom post type called videos which is why I placed that there. I have added the code you suggested to save the the video type but for some reason it wont display the video on the front end :(