How can I show different content for different user-levels?

This thread at wordpress.org – http://wordpress.org/support/topic/content-shown-based-on-user-role – suggests using the ‘current_user_can’ function This thread – http://wordpress.org/support/topic/display-a-custom-image-only-if-user-role-is-contributor – suggests you can use it like ‘current_user_can(‘contributor’)’ for different roles. I haven’t tried it but it sounds like it should work.

display custom portfolio tags

You will need to know the name for your “portfolio_tags” taxonomy. Check where it is defined as a custom taxonomy, and it will need to be added to the portfolio custom post type. The register_taxonomy() function would be your theme like this: register_taxonomy(‘portfolio_tags’, array(‘portfolio’), array(‘hierarchical’ => false, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => … Read more

How to add a custom thumbnail size for a specific category?

Put this code on your functions.php add_action( ‘after_setup_theme’, ‘clonecell_theme_setup’ ); function clonecell_theme_setup() { /* Set Default Image Sizes*/ add_image_size( ‘mini-thumbnail’, 50, 50, true ); // for clonecell recent post widget } Or if you already have an action hook on after_theme_setup,put the add_image_size on that function. Add another add_image_size using this format add_image_size($name, $width = … Read more

Custom Menu in Admin doesn’t change menu in browser

Your menu name doesn’t match in your sidebar. The theme_location should match the name of one of the registered menu’s in your functions.php file. Try replacing what you have with this: For the functions.php file: <?php add_theme_support( ‘menus’ ); add_action( ‘init’, ‘my_custom_menus’ ); function my_custom_menus() { register_nav_menus( array( ‘primary’ => __( ‘primary’ ), ‘secondary’ => … Read more

How i can get the URL?

Use site_url <?php echo site_url(); ?> http://codex.wordpress.org/Function_Reference/site_url Or get_site_url <?php echo get_site_url(); ?> http://codex.wordpress.org/Function_Reference/get_site_url Or even home_url <?php echo home_url(); ?> http://codex.wordpress.org/Function_Reference/home_url which returns the home URL for the site. Check the doc links for differences in available parameters.

Check if a different page has any attached images

$args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post_id ); $attachments = get_posts($args); if ($attachments) { echo “attachments rock!”; } } If you want to make sure the atachements are an image, you would use: if ( $attachments and wp_attachment_is_image( $post_id ) ) { echo “attachments rock!”; }