• stahe101

    (@stahe101)


    I’m pretty new to this stuff but here is the problem. I’m trying to figure out where the example 2 code would go. Example 2 is towards the bottom of this post. Hopefully someone good with coding can figure this out for me. I feel it’s an easy solution, just can’t figure it out myself due to lack of experience.

    My current page code: <?php get_header(); ?>

    <?php get_sidebar('left'); //init left sidebar ?>
    
    <?php do_action( 'bp_before_blog_page' ); ?>
    
    <div id="post-entry">
    
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); $author_email = get_the_author_meta('email'); $the_post_ids = get_the_ID(); $the_post_title = get_the_title(); ?>
    
    <div <?php if(function_exists("post_class")) : ?><?php post_class(); ?><?php else: ?>class="post"<?php endif; ?> id="post-<?php the_ID(); ?>">
    
    <div class="post-meta">
    <div style="width: 100%;" class="post-info">
    <h1 class="post-title"><?php the_title(); ?></h1>
    </div>
    </div>
    
    <div class="post-content">
    <?php $facebook_like_status = get_option('tn_buddysocial_facebook_like_status'); if ($facebook_like_status == 'enable') { ?>
    <div class="fb-like" data-href="<?php echo esc_attr(get_permalink($post->ID)); ?>" data-send="false" data-layout="standard" data-width="450" data-show-faces="false" data-font="arial" style="margin-bottom: 6px;"></div>
    <?php } ?>
    <?php the_content(); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </div>
    </div>
    
    <?php endwhile; ?>
    
    <?php if ( comments_open() ) { ?><?php comments_template('', true); ?><?php } ?>
    
    <?php else: ?>
    
    <?php locate_template ( array('lib/templates/wp-template/result.php'), true ); ?>
    
    <?php endif; ?>
    
    </div>
    
    <?php do_action( 'bp_after_blog_page' ); ?>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Here is the installation help I’m currently going by:

    Navigate to your WordPress ? blog’s theme folder which should be found in /wp-content/themes/the-name-of-your-theme
    You’ll need to create a new template file entitled “members.php”

    To do this copy your file entitled page.php and name it members.php.
    Place the code in “Example 1″ on the first line of the file.
    Remove the code that prints the page content and replace it with the code in “Example 2″.
    Upload the new file to the server.

    Here is example 2: <?php
    $members = new tern_members;
    `$members->members(array(‘search’=>true,’alpha’=>true,’pagination’=>true,’pagination2’=>true,’sort’=>true));
    ?>`

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

  • The topic ‘Fixing a simple code problem’ is closed to new replies.