Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional WordPress: Design and Development, 3rd Edition
This is the forum to discuss the Wrox book Professional WordPress: Design and Development, 3rd Edition by Brad Williams, David Damstra, Hal Stern; ISBN: 978-1-118-98724-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WordPress: Design and Development, 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old May 11th, 2016, 05:10 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default slider custom post examples

I followed the example in the book for creating a custom slider and had some issues with custom post types registering which resulted in a
Fatal error: Call to a member function have_posts() on null
using this piece of code:

	$args = array(
			    'posts_per_page' => '-1',
			    'post_type' => 'slides',
	$mySlides = new WP_Query( $args );
	while ( $myslides -> have_posts() ) : $myslides -> the_post();
	<a href="<?php the_permalink(); ?>"><?php the_title(); ?>slides</a><br />
	<?php endwhile;
				//reset postdata
What does the error mean exactly?
I've set up a custom post type as the book states?
I've relinquished using global variables?

Any tips pointers?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
WOW slider with aspnet page dksellou ASP.NET 4.5.1 General Discussion 1 April 28th, 2015 03:51 PM
Slider alignment justinneng BOOK: Beginning HTML, XHTML, CSS, and JavaScript 0 January 21st, 2012 12:22 PM
Need a vertical image slider arnabghosh ASP.NET 2.0 Professional 0 December 21st, 2009 09:45 AM
First Post! adding an icon to a custom user form Banquo_ws Excel VBA 2 March 6th, 2007 03:36 AM

All times are GMT -4. The time now is 11:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.