Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Releated games instead of (How to Play)

    Hi there ,
    Have a game Website and when you click on gamepage standart will show How to Play TAB.



    But I want to show Releated Games TAB



    PHP code :
    PHP Code:
    <div class="toppad"></div>
    <div class="tabs-wrapper">
    <ul class="tabs" style="width: 982px;">

    <?php if(get_option('tigu_howtoplay') == 'true'): ?>
    <li>
    <a href="#tab1"><?php _e('How to play''Gameleon'); ?></a>
    </li>
    <?php endif; ?>

    <?php if(get_option('tigu_post_tags') == 'true'): ?>
    <li class="">
    <a href="#tab2"><?php _e('Tags''Gameleon'); ?></a>
    </li>
    <?php endif; ?>

    <?php if(get_option('tigu_related') == 'true'): ?>
    <li class="">
    <a href="#tab3">
    <?php if(get_option('tigu_related_title_games') == 'Related [Category Title] Games'): ?>
    <?php _e
    ('Related''Gameleon'); ?> <?php $category get_the_category($post->ID); echo $category[0]->cat_name?> <?php _e('Games''Gameleon'); ?>
    <?php 
    else: ?>
    <?php _e
    ('Related Games''Gameleon'); ?>
    <?php 
    endif; ?>
    </a>
    </li>
    <?php endif; ?>
    <?php 
    if( is_myarcade_game() ): ?>
    <?php 
    if(get_option('tigu_embed_tab') == 'true'): ?>
    <li class=""> 
    <a href="#tab4"><?php _e('Embed''Gameleon'); ?></a>
    </li>
    <?php endif; ?>
    <?php 
    endif; ?>

    <?php if ( (get_option('tigu_dispay_screenshots') == 'true') && myarcade_count_screenshots() ): ?>
    <li class=""> 
    <a href="#tab5"><?php _e('Game Screenshots''Gameleon'); ?></a>
    </li>
    <?php endif; ?>

    <?php if(get_option('tigu_custom_tab') == 'true'): ?>
    <li class=""> 
    <a href="#tab6"><?php echo get_option('tigu_custom_tab_title''Custom Tab'); ?></a>
    </li>
    <?php endif; ?>

    </ul>

    <?php if(get_option('tigu_howtoplay') == 'true'): ?>
    <div id="tab1" class="tab_content" style="display:block;">
    <div class="instructions post-entry">
    <?php echo do_shortcode($instructions); ?>
    </div>
    </div>
    <?php endif; ?>

    <?php if(get_option('tigu_post_tags') == 'true'): ?>
    <?php 
    if(get_option('tigu_howtoplay') == 'false'): ?>
    <div id="tab2" class="tab_content" style="display:block;">
    <?php else: ?>
    <div id="tab2" class="tab_content" style="display:none;">
    <?php endif; ?>
    <div class="gamepage" style="padding-bottom:12px !important; padding-left:13px !important">
    <p class='tag_cloud'><?php the_tags(' ',' '); ?></p>
    </div>
    </div>
    <?php endif; ?>


    <!-- START DISPLAY RELATED GAMES BY TAGS -->
    <?php if (get_option('tigu_related_display_by''Related Games by Tags') == 'Related Games by Tags'): ?>

    <?php $related get_related_games($post->ID); ?>

    <?php if($related->have_posts() && $related->found_posts >= && get_option('tigu_related') == 'true'): ?>

    <?php if(get_option('tigu_howtoplay') == 'false' && get_option('tigu_post_tags') == 'true'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>

    <?php if(get_option('tigu_howtoplay') == 'true' && get_option('tigu_post_tags') == 'false'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>

    <?php if(get_option('tigu_howtoplay') == 'false' && get_option('tigu_post_tags') == 'false'): ?> 
    <div id="tab3" class="tab_content" style="display:block;">
    <?php endif; ?>
     
    <?php if(get_option('tigu_howtoplay') == 'true' && get_option('tigu_post_tags') == 'true'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>


    <div class="gamepage">

    <?php while($related->have_posts()): $related->the_post(); ?>
    <?php 
    if(has_post_thumbnail() || is_myarcade_game() ): ?>
    <?php
    if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
    $icon '<span class="' get_post_format($post->ID) . '-icon"></span>';
    } else {
    $icon '';
    }
    ?>
    <?php $image 
    wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'related-thumb'); ?>
    <?php 
    if ( empty($image[0]) ) $image[0] = myarcade_get_thumbnail_url(); ?>
    <div class="related-games block">
    <?php echo $icon?>
    <a class="hover_play_small tooltip" href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'>
    <img src="<?php echo $image[0]; ?>" width="81" height="60" alt="<?php the_title(); ?>" />
    </a>
    </div>
    <?php else: ?>
    <div class="related-games block">
    <a class="hover_play_small" href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'>
    <img src="<?php echo get_template_directory_uri(); ?>/images/thumbnail-76.png" width="81" height="60" alt="<?php the_title(); ?>" />
    </a>
    </div>
    <?php endif; ?>
    <?php 
    endwhile; ?>
    </div>
    </div>
    <?php endif; ?>

    <!-- END DISPLAY RELATED GAMES BY TAGS -->

    <?php else: ?>

    <!-- START DISPLAY RELATED GAMES BY CATEGORY -->

    <?php if(get_option('tigu_related') == 'true'): ?>

    <?php if(get_option('tigu_howtoplay') == 'false' && get_option('tigu_post_tags') == 'true'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>

    <?php if(get_option('tigu_howtoplay') == 'true' && get_option('tigu_post_tags') == 'false'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>

    <?php if(get_option('tigu_howtoplay') == 'false' && get_option('tigu_post_tags') == 'false'): ?> 
    <div id="tab3" class="tab_content" style="display:block;">
    <?php endif; ?>
     
    <?php if(get_option('tigu_howtoplay') == 'true' && get_option('tigu_post_tags') == 'true'): ?> 
    <div id="tab3" class="tab_content" style="display:none;">
    <?php endif; ?>


    <div class="gamepage">

    <?php
    $categories 
    get_the_category($post->ID);
    if (
    $categories) {
    $category_ids = array();
    foreach(
    $categories as $individual_category$category_ids[] = $individual_category->term_id;
    $args=array(
            
    'category__in' => $category_ids,
            
    'post__not_in' => array($post->ID),
     
        
    //  'post__not_in' => array( get_the_ID() ),
     
            
    'showposts'=>10,
            
    'caller_get_posts'=>1
        
    );
        
    $my_query = new wp_query($args);
        if( 
    $my_query->have_posts() ) {
             
          
            while (
    $my_query->have_posts()) {
                
    $my_query->the_post();
            
    ?>

     <?php if(has_post_thumbnail() || is_myarcade_game() ): ?>
    <?php
    if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
    $icon '<span class="' get_post_format($post->ID) . '-icon"></span>';
    } else {
    $icon '';
    }
    ?>
    <?php $image 
    wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'related-thumb'); ?>
    <?php 
    if (empty($image[0]) ) $image[0] = myarcade_get_thumbnail_url(); ?>
    <div class="related-games block">
     
    <a class="hover_play_small tooltip" href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'>
    <img src="<?php echo $image[0]; ?>" width="81" height="60" alt="<?php the_title(); ?>" />
    </a>
    </div>
    <?php else: ?>
    <div class="related-games block">
    <a class="hover_play_small" href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'>
    <img src="<?php echo get_template_directory_uri(); ?>/images/thumbnail-76.png" width="81" height="60" alt="<?php the_title(); ?>" />
    </a>
    </div>
    <?php endif; ?>
    <?php
            
    }
             
        }
    }
    ?>
    </div>
    </div>
    <?php endif; ?>
    <?php 
    endif; ?>

    <!-- END DISPLAY RELATED GAMES BY CATEGORY -->

    <?php if (function_exists('get_game')): ?>
    <?php 
    if(get_option('tigu_embed_tab') == 'true'): ?>
    <div id="tab4" class="tab_content" style="display:none;">
    <div class="instructions">

    <form name="select_all" class="formembed">
    <textarea class="formembedtext" name="text_area" onClick="javascript:this.form.text_area.focus();this.form.text_area.select();">
    <?php if (function_exists('get_game')): ?><?php echo get_game($mypostid); ?>
    <?php 
    else: ?>
    <?php 
    echo get_game($post->ID); ?>
    <?php 
    endif; ?>
    <?php 
    if(get_option('tigu_embed_text')): ?>
    <?php 
    echo do_shortcodestripslashesget_option'tigu_embed_text' ) ) ); ?>
    </div>
    <?php endif; ?>
    </textarea>
    </form>
    </div>
    </div>
    <?php endif; ?>
    <?php 
    endif; ?>

    <?php if ( (get_option('tigu_dispay_screenshots') == 'true') && myarcade_count_screenshots() ): ?>
    <div id="tab5" class="tab_content" style="display:none;">
    <div class="gamepage">
    <div class="block">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     <?php myarcade_all_screenshots(8160'gamescreenshots'); ?>
    <?php 
    endwhile; endif; ?>
    </div>
    </div>
    </div>
    <?php else: ?>
    <div id="tab5" class="tab_content" style="display:none;">
    <div class="gamepage">
    <div class="block">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     <?php myarcade_all_screenshots(8160'gamescreenshots'); ?>
    <?php 
    endwhile; endif; ?>
    </div>
    </div>
    </div>
    <?php endif; ?>

    <?php if(get_option('tigu_custom_tab') == 'true'): ?>
    <div id="tab6" class="tab_content" style="display:none;">
    <div class="instructions">
    <?php echo do_shortcodestripslashesget_option'tigu_custom_tab_code' ) ) ); ?>
    </div>
    </div>
    <?php endif; ?>

    </div>
    Can you help me with this. THX

  • #2
    New Coder
    Join Date
    Nov 2011
    Location
    Ratio, Logic
    Posts
    59
    Thanks
    3
    Thanked 6 Times in 6 Posts
    That is something you should set in widget/plugin options.
    Or just ask author here.


  •  

    Posting Permissions

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