Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




is_teaser_rs on home page (rc9.9302)

UserPost

1:57 pm
March 10, 2009


metal450

Member

posts 159

1

A "minor" bug with is_teaser_rs():

->My theme uses home.php for the main blog listing (www.justin-klein.com/wordpress), single.php for an individual post (www.justin-klein.com/wordpress/post3504), and index.php is a "fall-through" case (used for "not found").

->My theme's header.php performs the following check, so I can output custom 404 headers and a "private content" template in the case of a user trying to access a post without permission:

$noAccess =function_exists('is_teaser_rs') && is_teaser_rs();

if( $noAccess)

{/*output my "hidden page" stuff*/}

else

{/*do regular stuff*/}


->The odd behavior is that, in home.php, the "hidden page" message appears if the user does not have access to the FIRST post in the listing.  I temporarily fixed it by changing that line to

$noAccess = !is_home() && function_exists('is_teaser_rs') && is_teaser_rs();


2:51 pm
March 11, 2009


Kevin

Admin

posts 2402

2

Taking a cue from your workaround… Starting with rc9.9311, is_teaser_rs() and is_restricted_rs() will return false if called without an id argument from a non-single home path.


About the Agapetry forum

Currently Online:

15 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin