Custom fields to author box
-
Hi again-
I’m trying to add custom contact info or html to my author box instead of a button as you describe the process here:
I followed the first step of adding the following to the functions.php:
function my_epl_custom_user_contact( $contactmethods ) { $contactmethods['direct-line'] = __( 'Direct', 'easy-property-listings' ); $contactmethods['main-line'] = __( 'Main', 'easy-property-listings' ); return $contactmethods; } add_filter ('user_contactmethods','my_epl_custom_user_contact',10,1);
Then in the widget-content-author-tall.php I added the following:
<?php if ( $contactmethods->get_author_direct_line() != '' ) { ?> <span class="label-mobile"><?php _e('Direct', 'easy-property-listings' ); ?> </span> <span class="mobile"><?php echo $contactmethods->get_author_direct_line() ?></span> <?php } ?>
after
<?php if ( $epl_author->get_author_mobile() != '' ) { ?> <span class="label-mobile"><?php _e('Mobile', 'easy-property-listings' ); ?> </span> <span class="mobile"><?php echo $epl_author->get_author_mobile() ?></span> <?php } ?>
I then check the page and everything below the code I inputted into the template is gone and so are my footers.
Thanks again for your time!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom fields to author box’ is closed to new replies.