Forum Replies Created

Viewing 10 replies - 31 through 40 (of 40 total)
  • Thread Starter SEO Sheikh

    (@webfeetdesign)

    Hi, thanks for that @rochester.

    I’ve managed to create a streak, but for some reason the team order doesn’t work properly. I have Dragons 1, 2 and 3 teams. All created in order, so Dragons 1 team was created first, then 2, then three. I’ve made sure that the team IDs are in order too and post order has been set in correct sequence.

    For some reason though, it displays as:

    Dragons 1: WWWL
    Dragons 3: WLWL
    Dragons 2: WWLL

    When it should be:

    Dragons 1: WWWL
    Dragons 2: WWLL
    Dragons 3: WLWL

    Any ideas?

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Awesome, thanks Brian

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    That worked a treat thanks. The time of the event still links though. Is there a setting for that?

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    It should be the following;

    4 points for a win
    1 point for a draw
    0 points for a loss

    Bonus points are awarded if the team scores 4 or more tries in one match.
    Bonus point awarded if team loses by 7 points or less.

    I have no idea how I would create an equation for this. At the moment I’m adding the bonus points manually when I add the scores (which I don’t mind) but when it comes to updating the table, I have to add the bonus points and the total points which is an extra task to perform.

    Hope you can help.

    Thanks

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Hi @gator8 apologies for the late reply. Please see attached image;

    SEO Sheikh

    (@webfeetdesign)

    Hi can someone point me in the direction of a good tutorial to set up my automated league table? I have to manually update the total points and the bonus points each week. I’m not sure where to start with this.

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Sorry that didn’t work for some reason… this is the code I’ve used;

    <?php while ( have_posts() ) : the_post(); ?>
    
                    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    	<header class="entry-header">
                        	<h2 class="entry-title">
                            	<?php the_title(); ?>
                            </h2>
                        </header>
                        <p class="job-meta">
                        	Employer: <?php echo get_post_meta ($post->ID, 'job_employer', true); ?>
                        </p>
                        <div class="job-entry-content">
                        	<?php the_content(); ?>
                        </div>
                    </article>
    
    				<?php endwhile;// end of the loop ?>

    My function code for the custom post type is:

    // Custom Theme Type For Jacks Jobs Lists
    add_action('init', 'jobs_register');
    
    function jobs_register() {
    
    	$labels = array(
    		'name' => _x('Jobs', 'post type general name'),
    		'singular_name' => _x('Job Item', 'post type singular name'),
    		'add_new' => _x('Add New', 'job item'),
    		'add_new_item' => __('Add New Job Item'),
    		'edit_item' => __('Edit Job Item'),
    		'new_item' => __('New Job Item'),
    		'view_item' => __('View Job Item'),
    		'search_items' => __('Search Jobs'),
    		'not_found' =>  __('Nothing found'),
    		'not_found_in_trash' => __('Nothing found in Trash'),
    		'parent_item_colon' => ''
    	);
    
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
    		'rewrite' => true,
    		'capability_type' => 'post',
    		'has_archive' => 'job',
    		'hierarchical' => false,
    		'menu_position' => null,
    		'supports' => array('title','editor','thumbnail','excerpt')
    	  ); 
    
    	register_post_type( 'jobs' , $args );
    }
    
    register_taxonomy("position_type", array("jobs"), array("hierarchical" => true, "label" => "Position Type", "singular_label" => "Poistion Type", "rewrite" > true));
    
    // add all data fields to the add/edit post page
    add_action("admin_init", "admin_init");
    
    function admin_init(){
      add_meta_box("job_employer_meta", "Employer", "job_employer", "jobs", "normal", "high");
      add_meta_box("job_expiry_meta", "Job Expiry", "job_expiry", "jobs", "side", "low");
      add_meta_box("location_meta", "Location", "job_location", "jobs", "normal", "high");
      add_meta_box("salary_meta", "Salary", "job_salary", "jobs", "normal", "high");
    }
    
    // add Employer data field to the add/edit post page
    
    function job_employer(){
      global $post;
      $custom = get_post_custom($post->ID);
      $job_employer = $custom["job_employer"][0];
      ?>
      <label>Job Employer:</label>
      <input name="job_employer" value="<?php echo $job_employer; ?>" />
      <?php
    }
    
    // add Expiry data field to the add/edit post page
    
    function job_expiry(){
      global $post;
      $custom = get_post_custom($post->ID);
      $job_expiry = $custom["job_expiry"][0];
      ?>
      <label>Job Expiry Date:</label>
      <input name="job_expiry" value="<?php echo $job_expiry; ?>" />
      <?php
    }
    
    // add Location data field to the add/edit post page
    
    function job_location(){
      global $post;
      $custom = get_post_custom($post->ID);
      $job_location = $custom["job_location"][0];
      ?>
      <label>Job Location:</label>
      <input name="job_location" value="<?php echo $job_location; ?>" />
      <?php
    }
    
    // add Salary data field to the add/edit post page
    
    function job_salary(){
      global $post;
      $custom = get_post_custom($post->ID);
      $job_salary = $custom["job_salary"][0];
      ?>
      <label>Job Salary:</label>
      <input name="job_salary" value="<?php echo $job_salary; ?>" />
      <?php
    }
    
    add_action('save_post', 'save_details');
    
    function save_details(){
      global $post;
    
      update_post_meta($post->ID, "job_employer", $_POST["job_employer"]);
      update_post_meta($post->ID, "job_expiry", $_POST["job_expiry"]);
      update_post_meta($post->ID, "job_location", $_POST["job_location"]);
      update_post_meta($post->ID, "job_salary", $_POST["job_salary"]);
    }
    
    ?>
    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Cheers Archie22is. I ended up making my own but can’t seem to get it to display in the front end. Looks good in the admin and all seems to be working ok.

    See this thread I started for where I managed to get to –

    Cheers

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Thats great, works a treat. Thanks Paulwpxp!!!

    Thread Starter SEO Sheikh

    (@webfeetdesign)

    Ah that’s great, how does this work dynamically then? Is it possible for my client who won’t have very much coding knowledge, to add a page, then make the new link an image rollover?

    Cheers dkotter

Viewing 10 replies - 31 through 40 (of 40 total)