Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #436699

    Hi,

    I try to add a content of an article or a page above the footer.

    So in my child theme i edit the footer.php file and add this code

    <div id="footer_partenaires" class="container_wrap fullsize">
    	<div class="container">
    		<?php 
    			$liste_partenaire = get_post(137); 
    			echo $liste_partenaire->post_content;
    		?> 
    	</div>				
    </div>

    This result to display

    [av_one_full first] [av_partner columns='6' heading='' size='no scaling' border='av-border-deactivate' type='grid' animation='slide' navigation='arrows' autoplay='false' interval='5'] [av_partner_logo id='138'][/av_partner_logo] [av_partner_logo id='139'][/av_partner_logo] [/av_partner] [/av_one_full]

    Obviously i don’t want to display just the text.

    Thx for your help and work

    Regards

    #437597

    Hi leplusweb!

    You can try surrounding it with a do_shortcode call like so.

    echo do_shortcode($liste_partenaire->post_content);
    

    But it might have issues if your using fullwidth elements such as color sections or the fullwidth slider, etc etc.

    Cheers!
    Elliott

    #438823

    Hi,

    it’s works fine. Thanx for your help.

    It’s for boxed elements, so the fullwidth won’t be a problem

    Cheers!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add Post or Page with get_post’ is closed to new replies.