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

add a “list” into add meta box : problem

You are missing the declaration of the HTML select tag which options are his children so just add something like this: function myplugin_inner_custom_box() { // Use nonce for verification wp_nonce_field( plugin_basename( __FILE__ ), ‘myplugin_noncename’ ); // The actual fields for data entry echo ‘<label for=”myplugin_new_field”>’; _e(“Description for this field”, ‘myplugin_textdomain’ ); echo ‘</label> ‘; echo … Read more

How to create a page that lists custom taxonomies with links?

Once you get $taxonomy you can perform further logic: $tax = get_taxonomy( $taxonomy ); if( isset( $tax->has_archive ) && $tax->has_archive == true ) { // do output. archive will be wordpress_url + $taxonomy->name ?> <p> <a href=”https://wordpress.stackexchange.com/questions/43340/<?php echo site_url( $taxonomy->name ); ?>”> <?php echo $tax->labels->name; ?> </a> </p> <?php } This is untested, but you … Read more