• My WP settings
    – WordPress : 2.6.8
    – Theme : Arthémia, with some change
    – plugin : NextGenGallery
    – FAI : servhome.org
    – URL : https://cinazadaire.new.fr

    I create with more difficulty 1 shortcode function to show some posts in a page.
    The function work but the posts don’t show the ohters shortcode for nextgengallery ex: [nggallery id=6] or [youtube FDxSekVs8Uo]

    this my function :

    function ad_newsletter($atts, $content = null) {
            extract(shortcode_atts(array(
    	                "nwposts" => '5'
    	        ), $atts));
    			$retour='';
    			foreach(explode(",",$nwposts) as $post) {
    	            $data=get_post($post);
    				$retour.='<div class="ll"><div class="title"><a href="'. get_permalink($post) . '" rel="bookmark">'. $data->post_title .'</a></div>
    				<div class="spoiler">'. $data->post_content .'</div></div>';
    			}
    			return $retour;
    }
    add_shortcode("newsletter", "ad_newsletter");

    i put [newsletter nwposts=”id1,id2,id3,…”] in a page (ids are the posts list)
    you can see the result here in the section “Cours multimédia 2”

    The problem comes certainly from$data->post_content

    Could you tell me if there is a solution and what is the solution??
    Thanks by advance

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode problem’ is closed to new replies.