- This topic has 2 replies, 2 voices, and was last updated 8 years, 1 month ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Hey guys, was hoping someone could help me - I needed to remove the author box actions and customize one to be using the the the_content filter (custom theme for someone and I needed it to appear above some other output) - I still want the ability for the user to check if they want the author box to appear on single posts or archive pages from the Users settings menu. Simple if statements, but I can't seem to get the values of those options so I can run the if statements. Anyone done something like this before?
For single posts, you could use
<?php $user_author_box = get_the_author_meta( 'genesis_author_box_single' ); ?>
For archive pages you could use:
<?php $user_author_box = get_the_author_meta( 'genesis_author_box_archive' ); ?>
You need to be aware that these values only exist in the wp_user_meta table if they've been checked at some point. So they will either not exist, have a value of 1 if checked, and a value of null or empty if they had been checked at one point and later unchecked.
If these functions don't work, you could also try https://codex.wordpress.org/Function_Reference/get_user_meta
© 2023 WPEngine, Inc.