Moving Blog and Changing URL

Take a look at my plugin T5 All URIs. It prints all current URIs for posts and terms. From function print_term_uris(): $terms = get_terms( get_taxonomies(), array ( ‘hide_empty’ => FALSE, ‘get’ => ‘all’ ) ); foreach ( $terms as $term ) { print “\n” . get_term_link( $term ); } But if you keep the same … Read more

Foreach giving one too many list items, how can I remove the last empty line?

I’ve managed to find the answer to my problem of empty custom fields showing on the page. /** Get Fitness Custom Fields from listing page **/ add_filter( ‘woocommerce_single_product_summary’, ‘something_custom_fields’, 23 ); function something_custom_fields() { //Get picture from post meta or template directory $thumb = get_post_meta($post->ID,’Thumbnail’, true); $thumb = ( !empty( $thumb ) ) ? $thumb … Read more

How to make a text string into a bullet list [closed]

If your string is delimited by a comma , you can explode the string at this point into pieces (an array of items). If your string is separated by something else, such as spaces or | then explode that instead. <?php //assuming your string might look like: “USA, Canada, Japan, Russia” $countries = bp_member_profile_data( ‘field=Countries’ … Read more

Display all posts from selected month

You can use the pre_get_posts action to set posts_per_page to -1 on the monthly archive pages. I said wrongly in a comment to use is_archive() as your conditional. The problem with is_archive() is, it returns true on all archives, which includes category and taxonomy archive pages as well. I would suggest to make use of … Read more

How can I display only the post titles from a selected category in columns?

Updated answer: Use two floated lists to emulate columns, same approach as previously though. <?php /* Template Name: PageOfPosts */ get_header(); ?> <div id=”content”> <div class=”t”> <div class=”b”> <div class=”l”> <div class=”r”> <div class=”bl”> <div class=”br”> <div class=”tl”> <div class=”tr”> <div class=”pad”> <?php while( have_posts() ) : the_post(); ?> <?php $category = get_post_meta( get_the_ID(), ‘category’, … Read more