Wrap Meta Box with and for each new line

Try: <li> <?php echo wpautop( $lyrics_1);?> </li> instead of this line: <?php echo “<li>\n”; wpautop( $lyrics_1) ; “</li>\n”; ?> edit: thanks @Toscho for the syntax edit, I made a hasty error in my earlier revision 😉

Create shortcode for list of custom post titles with custom fields alongside

Try the following code: (I’ve not tested it, so there might be few things here and there, but you can get the overall idea): add_shortcode(‘boats’, ‘shortcode_boats’); function shortcode_boats($atts){ //merge the passed attributes with defaults extract( shortcode_atts( array( ‘post_type’ => ‘yacht-for-sale’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 15, ‘caller_get_posts’ => 1 //i am not sure what you … Read more

AZ Directory category

I wrote a tutorial on Creating an Alphabetical Glossary of Posts but here are the most relevant parts. First create a hidden taxonomy for the letters of the alphabet // Add new taxonomy, NOT hierarchical (like tags) function kia_create_glossary_taxonomy(){ if(!taxonomy_exists(‘glossary’)){ register_taxonomy(‘glossary’,array(‘post’),array( ‘show_ui’ => false )); } } add_action(‘init’,’kia_create_glossary_taxonomy’); Then when any post is saved, save … Read more

Create a Page Template Which Displays All Posts by Current User

Working code: <?php if (is_user_logged_in() ) : ?> <?php //if a certain page, then display posts authored by the logged in user $page_title=”Support History”; if ( is_user_logged_in() && is_page($page_title) ) { global $current_user; get_currentuserinfo(); $args=array( ‘author’ => $current_user->ID, ‘post_type’ => ‘post’, ‘post_status’ => ‘publish, private’, ‘posts_per_page’ => -1, ‘caller_get_posts’=> 1 ); $my_query = null; $my_query … Read more

Output categories in something different than a list

Did you had a look at the Display Categories Assigned to a Post example in wp_list_categories in the Codex. This should give you a very good idea on how to modify your own code. This is just my simplistic way to achieve what you want. Feel free to modify as needed <?php $taxonomy = ‘category’; … Read more

List all pages using a specific template on a page

You can create a custom post type called blog. This would group all your “blog” posts together. Once you have that done, create a template file called archive-blog.php, this will be the file that you can use to list all your posts under the “blog” custom post type. For a single post view, the template … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)