I'm experiencing som problems displaying matches manually in one of my theme files. Here's the piece of code I've added to the theme.
<?php leaguemanager_matches(1, mode='home') ?>
It makes the whole screen white. Anybody got an idea what's going on and can point me in the right direction?
The function call is not correct. I've made some small changes to the function calls, so upgrade to 3.0.2 and then do this:
<?php leaguemanager_matches( 1, array( 'mode' => 'home' ) ); ?>
Thanks,
And how would I add a custom template?
I mean how would I reference a custom template in that code?
<?php leaguemanager_matches( 1, array( 'mode' => 'home', 'template' => 'myTemplate') ); ?> ????
Custom templates need to be put in
your_theme_dir/leaguemanager/
the templates need to be named as follows
standings-$template.php
matches-$template.php
match-$template.php
teams-$template.php
team-$template.php
crosstable-$template.php
So with your code the template's name would have to be matches-myTemplate.php
Yea I allready have a template named matches-future.php in my_theme_dir/leaguemanager/. It's a slightly modified version of the matches template.
I guess my question is how I can use the template in the following code:
<?php leaguemanager_matches( 1, array( 'mode' => 'home' ) ); ?>
<?php leaguemanager_matches( 1, arraz('mode' => 'home', 'template' => 'future') ) ?>
For some reason it's not working. It's not using my custom template. Here's what I've done.
1. I've copied the matches.php file into my_theme_dir/leaguemanager/ and renamed it matches-future.php
2. I've modified the file slightly (deleted the first row from the table)
3. I've added the following code to one of my templates:
<?php leaguemanager_matches( 1, array('mode' => 'home', 'template' => 'future') ) ?>
It works if I use short code but not manually in the template. I don't have wp installed in my root directory (it's in root/wordpress) could that have anything to do with it?
Ok i've managed to locate the problem I think. In your functions.php the leaguemanager_matches function is missing 'template' => $template from the echo $lmShortcodes->showMatches. Thought you might wanna know that.