• Resolved houseofstrauss

    (@houseofstrauss)


    While this plugin works nicely with the default them, I can’t make it work with my current theme. Tried hacking the templates (now in theme folder) but no way !!. I know you’re going to ask what theme and it’s a premium theme. So, if I paste the page.php template here, can you give me instructions how to make this work? I already tried substituting the headers and footer, but I guess, I’m just out of reach

    thank-you (page.php of my theme below.)

    <?php
    get_header();
    fw_top_banner('page', get_post_meta(get_the_ID(), 'header_image', true)); //Get big header image
    $advanced_settings = get_option(THEME_PREFIX.'advanced_settings', true);
    ?>
    <!-- Content Section -->
    <div id="contentsec">
        <div class="inner">
            <!-- Columns -->
            <div class="columns">
                <!-- BreadCrumbs -->
                <div class="breadcrumb">
                   <?php echo get_the_breadcrumb();?>
                </div>
                <!-- Small side bar left -->
                <div class="col1 left" id="left_colum">
                    <?php if(have_posts()): while(have_posts()): the_post(); ?>
                    <!-- Blog -->
                    <div class="blog">
                        <h4 class="heading backcolr singlepage"><?php the_title();?></h4>
                        <!-- Post Detail -->
                        <div class="post detail">
    						<?php if($advanced_settings['publishing_info'] == 'active'):?>
                            <div class="postoptions">
                                <ul>
                                    <li class="author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" class="txthover"><?php the_author(); ?></a></li>
                                    <li class="date"><?php echo get_the_date(); ?></li>
                                    <li class="coments"><a href="<?php comments_link(); ?>" class="txthover"><?php echo comments_number(); ?></a></li>
                                </ul>
                            </div>
    						<?php endif;?>
                            <?php
    						if(has_post_thumbnail()):?>
    						<div class="thumb">
    							<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('blog-post');?></a>
    						</div>
    						<?php endif;?>
                            <div class="postdesc"<?php echo ($advanced_settings['publishing_info'] != 'active') ? ' style="border-top:none;margin-top:-5px;"' : '';?>>
                                <?php the_content(); ?>
                            </div>
                        </div>
    
                        <!-- Social Network-->
                        <div class="share">
                            <div id="sa_share_bar">
    							<?php
    							if($advanced_settings['show_links'] == 'active'):?>
    							<script type="text/javascript">
    							(function() {
    							var s=document.createElement('script');s.type='text/javascript';s.async = true;
    							s.src='http://s1.smartaddon.com/share_addon.js';
    							var j =document.getElementsByTagName('script')[0];j.parentNode.insertBefore(s,j);
    							})();
    							</script>
    
                                <ul>
                                    <li><h6 class="bold"><?php _e('Share', 'wisdom_of_life');?></h6></li>
                                    <li><a id="sa_share_facebook" layout="icon" size="24"></a></li>
                                    <li><a id="sa_share_twitter" layout="icon" size="24"></a></li>
                                    <li><a id="sa_share_googleplus" layout="icon" size="24"></a></li>
                                    <li><a id="sa_share_email" layout="icon" size="24"></a></li>
                                    <li><a id="sa_share_share" layout="icon" size="24"></a></li>
                                </ul>
    							<?php endif;?>
                                <!-- Print Button -->
                                <a href="javascript:void(0);" id="print_page" class="print">&nbsp;</a>
                            </div>
                          </div>
    				   </div>
    
    	             <?php if($advanced_settings['show_author'] == 'active'):?>
                    <!-- About Author -->
                    <div class="aboutauthor">
                        <div class="thumb">
                            <?php echo (function_exists('get_avatar')) ? get_avatar(get_the_author_id(), 80) : ''; ?>
                        </div>
                        <div class="desc">
                            <h4 class="colr bold"><?php printf( __('About Author: %s', 'wisdom_of_life'), get_the_author_meta('display_name')); ?></h4>
                            <p>
                                <?php echo get_the_author_meta('description');?>
                            </p>
                        </div>
                    </div>
                    <?php endif;?>
                    <?php endwhile; endif; ?>
                    <div class="clear"></div>
    
                    <?php if($postType != 'events'):?>
                        <?php comments_template( '', true ); ?>
                        <?php fw_comment_form(); ?>
                        <div class="clear"></div>
                    <?php endif; ?>
                </div>
                <!-- Small side bar left -->
                <div class="barsmall right" id="right_colum">
    				<?php
    					if(is_active_sidebar('page-sidebar')) dynamic_sidebar('page-sidebar');
                    ?>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
    <?php get_footer(); ?>

    http://wordpress.org/extend/plugins/wp-idea-stream/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mathieu Viet

    (@imath)

    Hello @houseofstrauss,

    As WP Idea stream uses 6 templates, you can try to use this one without changing anything by creating 4 files in your theme’s folder and copy the content above :

    • all-ideas.php
    • category-ideas.php
    • featured-ideas.php
    • tag-ideas.php

    Now if you want to include the rating system, you can add this tag just above the <?php the_content();?> tag :
    <div><?php wp_idea_stream_ratings();?></div>

    For all-ideas.php, you can try to add this tag just under your template tag <div class="col1 left" id="left_colum"> :

    <h1 class="page-title"><?php
    			printf( __( 'Number of ideas so far: %s', 'wp-idea-stream' ), wp_idea_stream_number_ideas() );
    		?></h1>

    For category-ideas.php, you can try to add this tag just under your template tag <div class="col1 left" id="left_colum"> :

    <h1 class="page-title"><?php
    			printf( __( 'Category Archives: %s | %s ideas were posted in this category so far', 'wp-idea-stream' ), '<span>' . single_cat_title( '', false ) . '</span>', '<span>' . wp_idea_stream_number_ideas() . '</span>' );
    		?></h1>

    For featured-ideas.php, you can try to add this tag just under your template tag <div class="col1 left" id="left_colum"> :

    <h1 class="page-title"><?php
    			 printf( __( 'Featured Ideas | %s ideas are featured so far', 'wp-idea-stream' ), '<span>' . wp_idea_stream_number_ideas() . '</span>');
    		?></h1>

    For tag-ideas.php, you can try to add this tag just under your template tag <div class="col1 left" id="left_colum"> :

    <h1 class="page-title"><?php
    			printf( __( 'Tag Archives: %s | %s ideas were posted in this tag so far', 'wp-idea-stream' ), '<span>' . single_tag_title( '', false ) . '</span>', '<span>' . wp_idea_stream_number_ideas() . '</span>' );
    		?></h1>

    From there, you’ll need to adapt your single.php template by copying its content in a new file single-idea.php and if you want to make available the rating system, simply add this tag above the <?php the_content();?> one :
    <?php wp_idea_stream_ratings_single();?>

    Finally, you’ll need to create the new-idea.php template. So you can try to copy the pasted content you added and to adapt it by replacing the loop (that is to say lines 10 to 78 of your code) by this code :

    <h1 class="page-title"><?php
    			 _e( 'Submit your idea!', 'wp-idea-stream' );
    		?></h1>
    
    		<?php do_action('wp_idea_stream_before_form_new_idea');?>
    
    		<?php do_action('wp_idea_stream_insert_editor');?>
    
    		<?php do_action('wp_idea_stream_after_form_new_idea');?>

    Hope this will help you to make the plugin displays well in your theme.

    Thread Starter houseofstrauss

    (@houseofstrauss)

    Thank-you imath for you detailed reply. I’ll try this and let you know how it goes.

    Did it work? I’m curious, I’m sure others to.

    Please leave feedback about how this ended for you.

    Thanks.

    Thread Starter houseofstrauss

    (@houseofstrauss)

    Yeah, sort of. TBH, I’m using a premium theme that does not play nicely with this plugin. It works perfectly on other themes I;ve used. Some plugins need a bit more coaxing to work and this is one of them. A bit of php knowledge is required and you need time to experiment.

    Thanks. This may help me to decide to use it or not. It’s not a simple plugin that’s for sure, all that playing around in the frontend and so.

    Do you have any other good experience with similar plugins you can share?

    Thanks.

    Thread Starter houseofstrauss

    (@houseofstrauss)

    One premium plugin here is worth a look. Again it works well on certain most themes. But you may want GPL instead of premium??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Idea Stream] Very hard to integrate to other themes’ is closed to new replies.