sam104573
Forum Replies Created
-
Forum: Plugins
In reply to: [Genesis Connect for WooCommerce] not display categories on shop pageI had this issue as well. To fix it, I had to go into the plugin folder and go to lib/template-loader.php and go to line 260 where it is
if( have_posts() )
and change it toif ( woocommerce_product_loop() )
Pretty much if you were just displaying the categories (potentially empty categories), have_posts() will fail but woocommerce_product_loop() actually looks for the categories as well.
Hopefully the developers will get this fixed soon.
The topic is called “Custom Player List” looks like it is being held for moderation for 72 hours…
So my solution:
1. Disable Players Lists. Don’t need this.
2. Import all your players on the appropriate teams
3. I turned players-list.php into a shortcode
a. Changed all the defaults to values that I wanted (took all the get_options out and replaced them with appropriate values)$defaults = array( 'id' => get_the_ID(), 'title' => 'Players', 'number' => -1, 'grouptag' => 'h4', 'columns' => null, 'grouping' => null, 'orderby' => 'default', 'order' => 'ASC', 'show_all_players_link' => false, 'show_title' => true, 'show_player_photo' => false, 'show_player_flag' => true, 'link_posts' => false, 'link_teams' => true, 'abbreviate_teams' => true, 'sortable' => true, 'scrollable' => true, 'paginated' => true, 'rows' => get_option( 'sportspress_list_rows', 10 ), );</blockquote>
b. Added positions to my labels: ( insert this code under
$labels = $data[0];
)
$labels['position'] = 'Positions';
c. Go to the bottom where they start filling up $output. Right under where they end the</thead>
, change the way the<tbody>
is built like this:$output .= '</tr>' . '</thead>'; if(get_post_meta($player_id, 'sp_current_team', true) != $id) { $tbody = ""; } $output .= '<tbody>' . $tbody . '</tbody>'; $output .= '</table>' . '</div>';
This code essentially sees if the current post ($id is the current post id, I use the shortcode only on team pages) is a team that player belongs to and then includes the player in the table if they are. If you want to display all teams, take out that if statement. You could also add a variable to the shortcode if you wanted to set which team of players should be displayed in your shortcode in the WordPress admin on a post or page. Let me know if you have any questions.
- This reply was modified 7 years, 10 months ago by Steven Stern (sterndata).
- This reply was modified 7 years, 10 months ago by Steven Stern (sterndata). Reason: fixed code
I am having the same problem. It would be awesome if this could be resolved!!!
Forum: Plugins
In reply to: [Nested Pages] Continuing permalink issuesJust figured this out as well. Took us so long because we didn’t think it could be Nested Pages. Why is it touching anything in the front end? Doesn’t make any sense.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Team Table ColumnsEssentially I am just trying to replicate the League Results that you see in the backend when you go to edit the team. It’s essentially a League Table but with one row (that row being the Team of whatever Team page you are on).
I don’t have any players on Team’s right now but I want users to be able to see how their team is fairing in the League/Season.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Table ColumnsForum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Table Columnsahhhh man this is exactly what I need…want to share the code to get the template to display? Trying to set up a single-team.php and there doesn’t seem to be a good way to display what is shown in the admin on the edit team page. [email protected]