Jump to content

WP Theme Footer w/ Linked Page


Morfie

Recommended Posts

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.