Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Custom field scoping

UserPost

4:30 pm
October 21, 2008


mkastner

Member

posts 9

1

I have just finally got everything up and running with beta 3 and I am hitting only one snag at this point. I don't know if this is something unique to this version or if all of them have had this limitation, but I wanted to get a few thoughts.

 I am a commerical real estate agent by trade and I use this section to share data on properties I recomment to my clients. I allow anyone to subscribe to my blog, but only subscribers with "client permission" will be allowed to view this section. The scoping of the content is now working for this section. What it isn't preventing from showing up is all my custom fields. I use these custom fields to display property specs, images and videos in a preformatted template.

Should the plugin be preventing the meta information from showing up or is this a limitation in its abilities? If it is a limitation, any thoughts on how I could tweak it to make it work? Thanks in advance.

3:00 pm
October 22, 2008


Kevin

Admin

posts 2402

2

You can solve this by editing your template file(s).  Find the place where the post meta (custom fields) data is retrieved, and wrap that in this condition:

if ( ! function_exists('is_teaser_rs') || is_teaser_rs( $post_id ) ) { // code that retrieves the post meta ( custom fields ) }

Change $post_id to whatever equivalent variable name is used in your template.

10:37 am
October 23, 2008


mkastner

Member

posts 9

3

I had to adapt your example a bit, but it works well. I eneded up creating an if/else statement with the no result coming up if is_teaser_rs exists, and my data if it doesn't. Seems to scope things properly. Now I just have to reformat everything to comply with how this is working. This display system does not  like the way my CSS for this data is set up. But the end is in sight. Thanks for the help.


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