How to define template directory in this widget code
You can use get_template_directory_uri() and it will return the url up to the template directory then you can just append the ‘/images/FILENAME.EXT’ to it to pull in the image.
You can use get_template_directory_uri() and it will return the url up to the template directory then you can just append the ‘/images/FILENAME.EXT’ to it to pull in the image.
Moved from comment to answer: Inside your taxonomy registration code, ‘_builtin’ => true shouldn’t be set to true, that’s specifically for built in taxonomies only(you shouldn’t even be setting that arg) and also conflicts with your args array which specifically asks for a false value.
I can’t test it now, but the following should work… query_posts(‘post_type=sponsors&meta_key=_vof_sponsor_level&meta_value=Gold’); if (have_posts()) : echo “<div class=”imageshadow sponsorwidgetslides”>”; while (have_posts()) : the_post(); if ( get_post_meta($post->ID, ‘url’, true) ) { ?> <a href=”https://wordpress.stackexchange.com/questions/39982/<?php echo get_post_meta($post->ID,”url’,true); ?>”><?php the_post_thumbnail(‘sponsorwidget’);?></a> <?php } else { the_post_thumbnail(‘sponsorwidget’); } endwhile; echo “</div><!–/.imageshadow–>”; echo “<a class=”widgetlink” href=””; bloginfo(“url’); echo “/sponsors’>View all Sponsors »</a>”; … Read more
No offense, but your code is a COMPLETE mess, so I’m just going to give you clean code and then tell you how to target it. register_sidebar( array( ‘name’ => ‘Post Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget widget-%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”titlediv”>’, ‘after_title’ => ‘</div>’, ) ); Then to target the title … Read more
There is no ability in the default widget, you will need to use third-party plugins to acheive your goal. Here are some that I have found. http://wordpress.org/extend/plugins/yd-recent-posts-widget/ http://wordpress.org/extend/plugins/get-recent-comments/
The function that replaces is_taxonomy() is named taxonomy_exists(). Than there’s also is_tax() and is_tag() that check if the query is for a taxonomy archive page. EDIT $selected_sidebar_replacement == ‘0’ || $selected_sidebar_replacement == ” won’t work. You’re not checking the type. Better do it like this: if ( ! $selected_sidebar_replacement OR emtpy( $selected_sidebar_replacement ) )
Seems that the article “How do I display read more buttons?” from http://themeshift.com/docs/read-more/ does the trick. You have to place the more button in the article and define yourself when the break should be.
I think you should use the post_submitbox_misc_actions add_action( ‘post_submitbox_misc_actions’, ‘publish_in_frontpage’ ); function publish_in_frontpage($post) { $value = get_post_meta($post->ID, ‘_publish_in_frontpage’, true); echo ‘<div class=”misc-pub-section misc-pub-section-last”> <span id=”timestamp”>’ . ‘<label><input type=”checkbox”‘ . (!empty($value) ? ‘ checked=”checked” ‘ : null) . ‘value=”1″ name=”publish_in_frontpage” /> Publish to frontpage</label>’ .'</span></div>’; }
I tried Chrome, IE9 and IE8 all without a problem and even on a slow Starbucks connection. But it might help to give height and width attributes to all the images above to prevent the page from cascading. The second problem (i.e. the object jumping during scroll) I think is simply an IE rendering flaw … Read more
Look at your browser source code; the bad code has to do with a plugin called wpui-related-posts. Do you have that activated? You can find/replace the code with a plugin called Search RegEx. Use grep to match the strings and delete it all.