Call the latest posts from a custom field group to be displayed on front-page

Okay, so you can paste this on your front page template. I assumed that your $prefix is prefix and products page id is 11 and you want to print last 3 entries. <?php $meta_entries_pre = get_post_meta( 11, ‘prefix_repeat_group’, true ); $meta_entries_int = array_reverse( $meta_entries_pre ); $meta_entries = array_slice( $meta_entries_int, 0, 3 ); if( ! empty( … Read more

WordPress taxonomy child image

You need to ask for the child term image field. You have only asked for the current page’s query object image, which may be blank depending on what the query object is. <?php $term_id = get_queried_object()->term_id; $taxonomy_name = get_query_var( ‘taxonomy’ ); $termchildren = get_term_children( $term_id, $taxonomy_name ); // Loop through each child taxonomy term foreach … Read more

How do you turn a custom field’s value into a permalink for that post?

Use make_clickable() function: add_action( ‘genesis_entry_footer’, ‘custom_comments_field’ ); function custom_comments_field() { if ( is_single() && genesis_get_custom_field(‘Comments link text’) ) : echo ‘<div class=”comments-link”>’. make_clickable( genesis_get_custom_field(‘Comments link text’) ) .'</div>’; endif; } UPDATE: In that case, try this: add_action( ‘genesis_entry_footer’, ‘custom_comments_field’ ); function custom_comments_field() { if ( is_single() && genesis_get_custom_field(‘Comments link text’) ) : global $post; echo … Read more

Thirtieth century date for a post

Why not changing the loop? Inside the loop, just check to see if the custom-field or post-meta which you provided for the custom date is filled or not and show the post date or custom date according to the conditions. You can also have a special page for that category’s timeline and a function for … Read more

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