Display Taxonomy Image on single.php
I used this little trick to obtain the taxonomy image given the ID of the term: <?php $images = get_option(‘taxonomy_image_plugin’); $img_url = wp_get_attachment_url( $images[$term_id] ); ?>
I used this little trick to obtain the taxonomy image given the ID of the term: <?php $images = get_option(‘taxonomy_image_plugin’); $img_url = wp_get_attachment_url( $images[$term_id] ); ?>
You should have to look at what the codex says about previous_post_link( $format, $link, $in_same_term = false, $excluded_terms=””, $taxonomy = ‘category’ ) and next_post_link( $format, $link, $in_same_term = false, $excluded_terms=””, $taxonomy = ‘category’ ) Both have the same parameters, the first parameter $format is the important one to have a look at here Format string … Read more
Just check for the global $numpages variable: <?php global $numpages; if ( is_singular() && $numpages > 1 ) { // This is a single post // and has more than one page; // Do something. } ?>
Sometimes this would be achievable with add_rewrite_url but it looks like in this case it’s not as you need to redirect to a different domain. In this case you need .htaccess or nginx rules to do this, so you need to add something like this to your nginx config for domain.com only, in order to … Read more
I found a solution here: http://gabrieleromanato.name/wordpress-fix-the-404-error-on-custom-post-types/ Here’s what you need to do to get it to work (quoted from site above): Go to Settings → Permalinks and change your current structure to: /%category%/%postname% Save changes. Restore your original permalink settings. Save changes.
Although I’m also curious as to why you’d want to do this, and would probably suggest using a custom post type instead, this would probably work (actually works for any single post type except pages and attachments): add_action( ‘pre_get_posts’, ‘wpse44983_single_post_404’ ); function wpse44983_single_post_404( $query ) { if ( $query->is_main_query() && $query->is_single() ) { $query->is_404 = … Read more
Echo it out… <?php echo get_the_author(); ?>
To me it’s very simple, but a bit static. You can make a new front-page.php with the structure you mentioned. Then first make some pages (i.e.: About us, Members 1, Contact etc.) in your wp-admin. And use the get_page() function to call different page [using their individual ID] into different zone. Am I right?
Here’s the direction to go, I think: The WP Infinite Scroll plugin works by identifying your page’s navigation and then, I think, loading the next link found there. So instead modifying the query on single.php, I’m now trying to modify the pagination. I’ve tried several pagination functions, such as posts_nav_link() and twentytwelve_content_nav( ‘nav-below’ ), neither … Read more
It is not listed in the Codex but perhaps the word ‘slug’ in the pages URL is a reserved word? Just a wild guess and could be completely wrong. I thought it may be worth mentioning however as others may encounter a similar problem and might be the result of using reserved words. If you … Read more