Community Support Forums — WordPress® ( Users Helping Users ) — 2011-03-23T19:22:59-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2700 2011-03-23T19:22:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=8234#p8234 <![CDATA[Re: Pro Login Widget via PHP tag]]>

Statistics: Posted by Cristián Lávaque — March 23rd, 2011, 7:22 pm


]]>
2011-03-23T07:00:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=8207#p8207 <![CDATA[Re: Pro Login Widget via PHP tag]]> Statistics: Posted by jacksonmurphy — March 23rd, 2011, 7:00 am


]]>
2011-03-22T23:03:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=8171#p8171 <![CDATA[Re: Pro Login Widget via PHP tag]]> call_user_func_array() on a non-static member function. This is going to be corrected in the maintenance release of s2Member v3.5.6. Thanks for your assistance in this matter!

Statistics: Posted by Jason Caldwell — March 22nd, 2011, 11:03 pm


]]>
2011-03-18T21:51:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=8005#p8005 <![CDATA[Re: Pro Login Widget via PHP tag]]> I appreciate you taking time to help solve my issue here...
I'll email support...

But to make sure that the test page is using the correct template, I put some text in the template...
Also added the Login Widget to the sidebar...

http://www.annawilson.com/pr-kit-test/

Code:

<?php
/**
 * Template Name: Presskit-Test
 */
 
?>
 
 <?php get_header(); ?>



    <!-- The class "grid_7" restricts the div to 7 columns wide -->
    <div id="content" class="grid_10 prefix_1">

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
        
            <div class="entry">
                
                This is Presskit-Test Template:<br /><br />
                
                The login widget should show up here:<br />
                
               <?php echo s2member_pro_login_widget(); ?>


            </div><!-- end entry -->
            
        </div><!-- end post -->
        
        <?php endwhile; endif; ?>
        <?php edit_post_link('Edit this entry.''<p>''</p>'); ?>
        <br />
    </div><!-- end content -->

    <div id="sidebar" class="grid_4">
    <?php
    
if ( ! dynamic_sidebar'press-widget' ) ) : ?>
    <?php endif; // end primary widget area ?><br />
    </div>


<?php get_footer(); ?>

Statistics: Posted by jacksonmurphy — March 18th, 2011, 9:51 pm


]]>
2011-03-18T19:56:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=8003#p8003 <![CDATA[Re: Pro Login Widget via PHP tag]]> Thanks for reporting your experience with s2Member.
~ and thank you Cristián for bringing this to my attention.
jacksonmurphy wrote:
Would it have anything to do with PHP settings on the server?
http://www.annawilson.com/test.php

To answer this question. No, I doubt that it has anything to do with PHP configuration.

I've just been over this entire thread and I took a quick look at your test page. I'm sorry, there's nothing jumping right out at me. Everything here looks as if it should be working. My "best guess" at this point, is that your test page is actually NOT using that Page Template you're working from. Is it possible that you have another Page Template that creates similar output; and thus, is creating some confusion?

If this problem continues, please send an email to support with a Dashboard login.

Statistics: Posted by Jason Caldwell — March 18th, 2011, 7:56 pm


]]>
2011-03-17T08:55:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7942#p7942 <![CDATA[Re: Pro Login Widget via PHP tag]]> http://www.annawilson.com/test.php

Statistics: Posted by jacksonmurphy — March 17th, 2011, 8:55 am


]]>
2011-03-16T19:29:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7931#p7931 <![CDATA[Re: Pro Login Widget via PHP tag]]>

Statistics: Posted by Cristián Lávaque — March 16th, 2011, 7:29 pm


]]>
2011-03-16T18:38:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7929#p7929 <![CDATA[Re: Pro Login Widget via PHP tag]]> Statistics: Posted by jacksonmurphy — March 16th, 2011, 6:38 pm


]]>
2011-03-16T12:36:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7917#p7917 <![CDATA[Re: Pro Login Widget via PHP tag]]>
Regarding what you're trying to do, that should be fine. Since you're doing most of that in PHP, there's no real need to get in and out of PHP all the time, you could do it like this:

Code:
<?php if (is_user_logged_in() && current_user_can('access_s2member_ccap_presskit'))
    the_content('<p class="serif">Read the rest of this page &raquo;</p>');
else
    echo '<h1>Members of the Press Only</h1> Please login to view this page.', s2member_pro_login_widget(); ?>

Statistics: Posted by Cristián Lávaque — March 16th, 2011, 12:36 pm


]]>
2011-03-16T11:51:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7911#p7911 <![CDATA[Re: Pro Login Widget via PHP tag]]> http://www.annawilson.com/pr-kit-test/

If I can get this widget to show, I want to be able to redirect the user back to this page... where they can view the content... once logged in (see code below)

This is what I currently have in my template:

Code:

<?php
/**
 * Template Name: Presskit Test
 */
 
?>
 
<?php get_header(); ?>

    <!-- The class "grid_7" restricts the div to 7 columns wide -->
    <div id="content" class="grid_10 prefix_1">

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
        
            <div class="entry">
                
                <?php echo s2member_pro_login_widget(); ?> 

            </div><!-- end entry -->
            
        </div><!-- end post -->
        
        <?php endwhile; endif; ?>
        <?php edit_post_link('Edit this entry.''<p>''</p>'); ?>
        <br />
    </div><!-- end content -->

    <div id="sidebar" class="grid_4">
    
    </div>

<?php get_footer(); ?>


This is what I'm trying to do:

Code:

<?php if (is_user_logged_in() && current_user_can("access_s2member_ccap_presskit")) { ?>
                
                    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
                
                <?php } else { ?>
                
                    <h1>Members of the Press Only</h1>
                    Please login to view this page.
                    <?php echo s2member_pro_login_widget(); ?>
                
                <?php ?> 

Statistics: Posted by jacksonmurphy — March 16th, 2011, 11:51 am


]]>
2011-03-16T11:28:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7908#p7908 <![CDATA[Re: Pro Login Widget via PHP tag]]>

Would you post between code tags the code of the template file with the login widget that's not showing up? Like this:

[code=php]Your template file code[/code]

Statistics: Posted by Cristián Lávaque — March 16th, 2011, 11:28 am


]]>
2011-03-16T09:14:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7905#p7905 <![CDATA[Re: Pro Login Widget via PHP tag]]> Thanks for your response.
I do have s2Member Pro...
I am putting the php code inside a custom template... not inside a post or page.

Statistics: Posted by jacksonmurphy — March 16th, 2011, 9:14 am


]]>
2011-03-15T19:38:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7888#p7888 <![CDATA[Re: Pro Login Widget via PHP tag]]>
You'll also need this plugin http://wordpress.org/extend/plugins/php ... on-plugin/ for PHP to work in your posts.

Hope that helps. :)

Statistics: Posted by Cristián Lávaque — March 15th, 2011, 7:38 pm


]]>
2011-03-15T19:21:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2700&p=7887#p7887 <![CDATA[Pro Login Widget via PHP tag]]>
I insert this code:

Code:
<?php echo s2member_pro_login_widget(); ?>


And nothing shows up?
Any ideas why this wouldn't work?

Statistics: Posted by jacksonmurphy — March 15th, 2011, 7:21 pm


]]>