Jump to content

Morfie

New Members
  • Posts

    2
  • Joined

  • Last visited

Morfie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Simplified for everyone's sanity and re-posted. Got a Wordpress Conference theme, lets you enter speakers into a database and assign each one a category/role. In the settings for the theme, there's a dropdown from which you can select one of the roles you create. Doing so will display all the speakers assigned that role in the footer of the homepage and also populate a stand-alone Speakers page with the same role. I want to make it so that the footer on the homepage displays one role and the stand-alone speaker page displays another. Here's the PHP for the Speakers page (identical to the footer PHP) <?php /** * Template Name: Speakers page * Description: Speakers page * * @package WordPress * @subpackage wpconference * @since wpconference 0.1 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <h1 class='entry-title'><?php the_title(); ?></h1> <?php global $conf_sched; $speakers_category = $conf_sched->get_option('speakers-category',-1); if($speakers_category !=-1){ $speaker = get_term($speakers_category, 'participant-roles'); $conf_sched->shortcode_participants(array('role'=>$speaker->slug)); }else { _e("To be annouced...",'wpconference'); } ?> </div> <!-- #content --> </div> <!-- #primary --> <?php get_footer(); ?> Here's the HTML for the "dropdown" portion of the settings, where you can see the role categories available. "Speaker" is the default created by the Theme, "whyattend" is the one I made. <!-- Speakers Category --> <tr valign="top"><th scope="row">Speakers Category</th> <td> <select name='conf_sched[speakers-category]' id='cat_speakers' class='postform' > <option value='-1'>&#8212;</option> <option class="level-0" value="2">Speaker</option> <option class="level-0" value="17" selected="selected">whyattend</option> </select> <br /> <span class="description">Please choose which category is your speakers category. If none is available please go to Participants menu and add a new role speakers</span> </td> </tr> I want "whyattend" to show on the Footer and "Speaker" to populate the Speakers page. Can this be done?
  2. Hello everyone. Bear with me here, I'm not a true PHP or otherwise coder by trade and have only a basic understanding of the terminology. I'll try to explain my issue as clearly as I can. I'm working with a Wordpress theme. The "WP Conference Theme" to be exact. This theme allows you to quickly and easily add Speakers to your conference by way of an automated form. When you create a new speaker, you have the option to create a new "role" for them. This can be anything you want, such as "moderator", "host, "panelist" - what have you. Picture 1: In the general settings for the conferece, there is a dropdown where you have the option to select a "role" of speaker to display on the footer of the homepage - additionally, the category of speaker selected here is used to populate a stand-alone page showcasing all the speakers. Every speaker assigned the selected role appears in both these locations. Here is a shot of the HTML from the source code of this dropdown: Here you can see the default role "Speaker" and the new role I have created, "whyattend". Currently the footer and speaker page show whichever "role" is selected from the dropdown in the general settings. I want to show one category of speaker in the footer (whyattend), and have an entirely different category show on the speaker page (Speaker). Since the Speaker page populates automatically by way of the role selected in the general settings, I started with the code for the Footer. Here is the PHP for the Footer: I have tried playing around with this already and have gotten results CLOSE to what I am looking for, but not quite. The closest I came was by changing the last instance of "('role'=>$speaker" to "('role'=>$whyattend". Doing this shows ONLY those desginated as "speakers" on the Speaker page, but it still shows all of the roles on the footer. The PHP on the Speaker page is identical to this code on the footer. I apologize if this is confusing.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.