Community Forums › Forums › Archived Forums › Design Tips and Tricks › Options not appearing in Theme Settings – Agency Pro with Epik Portfolio
Tagged: agency pro, Epik, portfolio, theme settings
- This topic has 5 replies, 2 voices, and was last updated 9 years, 6 months ago by Tonya.
-
AuthorPosts
-
September 18, 2014 at 7:08 pm #124987admMember
I have integrated the portfolio from Epik into Agency Pro. However, the code I have integrated in functions.php that places the portfolio options in the Genesis -->Theme Settings section is not working, so I am unable to restrict which post category goes in the portfolio.
Here is the code I placed:
http://www.milkpaws.com/** * This is a necessary go-between to get our scripts and boxes loaded * on the theme settings page only, and not the rest of the admin */ function epik_theme_settings_init() { global $_genesis_admin_settings; add_action( 'load-' . $_genesis_admin_settings->pagehook, 'epik_add_portfolio_settings_box', 20 ); } // Add Portfolio Settings box to Genesis Theme Settings function epik_add_portfolio_settings_box() { global $_genesis_admin_settings; add_meta_box( 'genesis-theme-settings-epik-portfolio', __( 'Portfolio Page Settings', 'epik' ), 'epik_theme_settings_portfolio', $_genesis_admin_settings->pagehook, 'main' ); } /** * Adds Portfolio Options to Genesis Theme Settings Page */ function epik_theme_settings_portfolio() { ?> <p><?php _e("Display which category:", 'genesis'); ?> <?php wp_dropdown_categories(array('selected' => genesis_get_option('epik_portfolio_cat'), 'name' => GENESIS_SETTINGS_FIELD.'[epik_portfolio_cat]', 'orderby' => 'Name' , 'hierarchical' => 1, 'show_option_all' => __("All Categories", 'genesis'), 'hide_empty' => '0' )); ?></p> <p><?php _e("Exclude the following Category IDs:", 'genesis'); ?><br /> <input type="text" name="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_cat_exclude]" value="<?php echo esc_attr( genesis_get_option('epik_portfolio_cat_exclude') ); ?>" size="40" /><br /> <small><strong><?php _e("Comma separated - 1,2,3 for example", 'genesis'); ?></strong></small></p> <p><?php _e('Number of Posts to Show', 'genesis'); ?>: <input type="text" name="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_cat_num]" value="<?php echo esc_attr( genesis_option('epik_portfolio_cat_num') ); ?>" size="2" /></p> <p><span class="description"><?php _e('<b>NOTE:</b> The Portfolio Page displays the "Portfolio Page" image size plus the excerpt or full content as selected below.', 'epik'); ?></span></p> <p><?php _e("Select one of the following:", 'genesis'); ?> <select name="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_content]"> <option style="padding-right:10px;" value="full" <?php selected('full', genesis_get_option('epik_portfolio_content')); ?>><?php _e("Display post content", 'genesis'); ?></option> <option style="padding-right:10px;" value="excerpts" <?php selected('excerpts', genesis_get_option('epik_portfolio_content')); ?>><?php _e("Display post excerpts", 'genesis'); ?></option> </select></p> <p><label for="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_content_archive_limit]"><?php _e('Limit content to', 'genesis'); ?></label> <input type="text" name="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_content_archive_limit]" id="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_content_archive_limit]" value="<?php echo esc_attr( genesis_option('epik_portfolio_content_archive_limit') ); ?>" size="3" /> <label for="<?php echo GENESIS_SETTINGS_FIELD; ?>[epik_portfolio_content_archive_limit]"><?php _e('characters', 'genesis'); ?></label></p> <p><span class="description"><?php _e('<b>NOTE:</b> Using this option will limit the text and strip all formatting from the text displayed. To use this option, choose "Display post content" in the select box above.', 'genesis'); ?></span></p> <?php }
September 18, 2014 at 8:42 pm #124997admMemberSeptember 18, 2014 at 11:36 pm #125017TonyaMemberHi,
I'm not on my dev mac at the moment, else I'd check the Epik them directly for you. But looking at the code you posted, epik_theme_options_init needs to be a callback from a hook. My first guess is genesis_admin_init() or even just admin_init. If this doesn't solve it for you, I'll look at the source tomorrow.
Cheers,
Tonya
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampSeptember 19, 2014 at 11:37 am #125072TonyaMemberHi,
Just opened up Epik theme. Did you include this hook?
add_action( 'admin_menu', 'epik_theme_settings_init', 15 );
This is the hook that ties the epik_theme_settings_init to launch in the admin area.
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer BootcampSeptember 19, 2014 at 11:47 am #125074admMemberI did not - that did the trick!!! Thanks so much, Tonya! You rock 🙂
V
September 19, 2014 at 11:53 am #125075TonyaMemberYou're welcome! Enjoy your weekend.
Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp -
AuthorPosts
- The topic ‘Options not appearing in Theme Settings – Agency Pro with Epik Portfolio’ is closed to new replies.