www.webdeveloper.com
Results 1 to 3 of 3

Thread: MYBB latest posts in wordpress sidebar

  1. #1
    Join Date
    Jul 2006
    Posts
    110

    MYBB latest posts in wordpress sidebar

    Hello, I have recently starting using Wordpress. This time I also have a forum built with MYBB. There are a couple of widgets for use called MYBB latest posts and also MYBB latest Topics. The widgets allows the Forum posts/threads to go in the sidebar of the Wordpress much like the regular wordpress "latest posts" widget I suppose but I can't get either of them to work. I wonder if anyone else has used or tried this.

  2. #2
    Join Date
    Jul 2006
    Posts
    110
    So, I deactivated a few of the other plugins to see if they were messing things up and that didn't work. The link for the MYBB Last Topics had some very very brief instructions. It said "Place <?php lasttopics(); ?> in your templates and [lasttopics] in page or post." I didn't know where in the template to put the php line so I placed it at the very end of the function.php file and it gave me an error. So I added it to a text widget in my wordpress sidebar and then I added [lasttopics]to one of my pages and it actually worked but it's not what I wanted. So, where abouts would I place that php line without messing things up. Here is my functions.php code
    Code:
    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    
    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Education Theme' );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/education' );
    
    /** Create additional color style options */
    add_theme_support( 'genesis-style-selector', array( 
    	'education-black'	=> __( 'Black' , 'education' ), 
    	'education-green'	=> __( 'Green' , 'education' ), 
    	'education-purple'	=> __( 'Purple' , 'education' ), 
    	'education-red'		=> __( 'Red' , 'education' ), 
    	'education-teal'		=> __( 'Teal' , 'education' ) 
    ) );
    
    add_action( 'genesis_meta', 'education_add_viewport_meta_tag' );
    /** Add Viewport meta tag for mobile browsers */
    function education_add_viewport_meta_tag() {
    
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
        
    }
    
    /** Add new image sizes */
    add_image_size( 'featured-image', 466, 130, TRUE );
    
    /** Add structural wraps */
    add_theme_support( 'genesis-structural-wraps', array(
    	'header', 
    	'nav', 
    	'subnav', 
    	'inner', 
    	'footer-widgets', 
    	'footer' 
    ) );
    
    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array( 
    	'width' => 1140, 
    	'height' => 120 
    ) );
    
    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    /** Reposition Primary Navigation */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_nav' );
    
    /** Reposition Secondary Navigation */
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_subnav' );
    
    /** Reposition Breadcrumbs */
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_before_content', 'genesis_do_breadcrumbs' );
    
    add_filter( 'genesis_comment_list_args', 'child_comment_list_args' );
    /** Change avatar size */
    function child_comment_list_args( $args ) {
    
        $args = array(
    			'type' => 'comment',
    			'avatar_size' => 33,
    			'callback' => 'genesis_comment_callback'
    		);
    		
    		return $args;
    		
    }
    
    /** Register widget areas */
    genesis_register_sidebar( array(
    	'id'			=>	'slider',
    	'name'			=>	__( 'Slider', 'education' ),
    	'description'	=>	__( 'This is the slider section.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 	'intro',
    	'name'			=>	__( 'Intro', 'education' ),
    	'description'	=>	__( 'This is the intro section displayed below the slider.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=>	'featured',
    	'name'			=>	__( 'Featured', 'education' ),
    	'description'	=>	__( 'This is the featured section displayed below the intro.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=>	'call-to-action',
    	'name'			=>	__( 'Call To Action', 'education' ),
    	'description'	=>	__( 'This is the call to action banner.', 'education' ),
    ) );
    /** Customize the credits */
    add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' );
    function custom_footer_creds_text() {
        echo '<div class="creds"><p>';
        echo 'Copyright &copy; ';
        echo date('Y');
        echo ' &middot; <a href="http://wiga.ca/">WIGA</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
        echo '</p></div>';
    }
    Thanks. I have a splash page up at the moment while working on the site but would remove it for now if someone could help me and needs to see it.

  3. #3
    Join Date
    Sep 2012
    Posts
    720
    Very informative information. Thanks for posting.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles