I am creating a custom page template in a child theme that uses TwentyEleven as a parent theme. I’m using the custom page as a static front page.
I already have a jQuery slider that pulls from a loop made from a custom post type using:
<?php $loop = new WP_Query(array('post_type' => 'models', 'posts_per_page' => -1)); ...etc
I would like to show the last ten updates from all sub blogs. This may be an obvious answer, but what is the appropriate query to show:
name of blog, title, author and date.
Can’t get anything to work.
Am I better off customizing the index.php and related pages, or is there a way to query and pull this info from a custom template?
Hope that makes sense. Been a long day and my head is pounding a big 😉
If you’re already pulling the posts to the main site with SWT, just write the query the same way you’d do it for a single blog.
If you want the title of the blog itself.. it’s not a simple query. 😉
have you looked at these widgets, with the work done for you?
I checked that out, thanks Andrea 🙂
I haven’t been able to find any clear example of implementing the shortcode function in a theme file.
I know this isn’t your plugin, but any ideas? I’m getting errors on mine. I’m looking for the blog list example.
Are you looking for how to make a shortcode in general?
After installing, at the bottom of the settings page it suggests this:
<?php echo do_shortcode('[shortcode option1="value1" option2="value2"]'); ?>
I tried this (with a parameter:
<?php echo do_shortcode('[diamond-bloglist min_post_count="5" ]'); ?>
And got this error:
Warning: file_get_contents(/Applications/XAMPP/xamppfiles/htdocs/theproject/wp-content/plugins/diamond-multisite-widgets/cache_bloglist) [function.file-get-contents]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/theproject/wp-content/plugins/diamond-multisite-widgets/diamond-cache.php on line 16
The error was repeated several times but with different line numbers.
but, at the bottom of the errors I got one link to one of the network sites.
The permission denied part. Not sure if that’s a setting issue or something else.
So, was wondering is this a semantic issue or?
- The topic ‘Sitewide Tags, Multiple Queries and Custom Page Template (static front page)’ is closed to new replies.