Custom Field IF/ELSE PHP

You mean something like this? $customhref = get_post_meta( $post->ID, ‘_ct_text_4dc9e9f74d000’, true ); if ( $customhref ) { ?> <a href=”https://wordpress.stackexchange.com/questions/16913/<?php echo $customhref; ?>”>Go To Store!</a> <?php } else { echo ‘N/A’; }

Alter required message using comment form api

What you need to use is comment_form_defaults filter that has large and nested $defaults array passed. That array will have (among other things) something like this in it: fields author << this will have something like <span class=”required”>*</span> in it email << this will have something like <span class=”required”>*</span> in it url comment_notes_before << this … Read more

How i can obtain all the post meta for a specific post as an array?

there is no single function you can use but you can create your own something like: function get_all_post_fields($post_id){ $p[‘standard’] = get_post($post_id, ARRAY_A); $p[‘meta’] = get_post_custom($post_id); return $p; } then once you have this in your functions.php file you can use it: $fields_all = get_all_post_fields($ID); Update: If you have just the title then i have a … Read more

WordPress Stripping Colons?

No idea why your colons are getting stripped out. Your original code, or @EAMann’s answer, should both work unless you have some very strange filter going on. But using built-in functions to get permalinks should make your life easier in general than trying to concatenate them yourself. Try this: <a href=”https://wordpress.stackexchange.com/questions/34822/<?php echo get_author_posts_url( $curauth->ID ); … Read more

Help solving t_echo php error while using echo do_shortcode

You’ve got an echo inside an echo. Rewrite you code like this: <?php echo do_shortcode(‘[orbit-slider category=”‘ . get_post_meta($post->ID, “slide-category”, true) . ‘”]’); ?> This will concatenate things instead. and give you ‘[orbit-slider category=”5″]’ inside the do_shortcode() function.