• Resolved mikejersey

    (@mikejersey)


    Hi.

    Silly question perhaps…
    I dont work with php so Im having problems installing the php code in the theme.

    Im using twenty thirteen theme and according to the instructions, I need to add the code;
    <?php if(is_user_logged_in()) {
    $renc=new RencontreWidget; $renc->widget(0,0);} ?>

    into page.php.

    I can edit ‘Twenty Thirteen: Page Template (page.php)’, but the problem is that I dont know where to insert the code so that it works and does not generate an error. :/

    Can you assist please?
    Thanks

    https://ww.wp.xz.cn/plugins/rencontre/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jacques Malgrange

    (@sojahu)

    Hi,

    I just change the F.A.Q to complete this part. In your case, with theme 2013, you need to delete all your page-rencontre.php content and replace with this content :

    <?php // theme 2013
    /**
    Template Name: page-rencontre
    */
    get_header(); ?>
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    			<div class="site-info">
    				<?php if(is_user_logged_in()) {$renc=new RencontreWidget; $renc->widget(0,0);} ?>
    				<?php if(!is_user_logged_in()) Rencontre::f_ficheLibre(); ?>
    			</div><!-- .site-info -->
    		</div><!-- #content -->
    	</div><!-- #primary -->
    <?php get_footer(); ?>

    Regards,

    Thread Starter mikejersey

    (@mikejersey)

    Ah. 🙂 Thanks very much for your reply. I will be trying that later. Regards. M

    Plugin Author Jacques Malgrange

    (@sojahu)

    Resolved

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘installing php code?’ is closed to new replies.