trim ('menu'))); ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>
post_content)); }else{ $page_content = do_shortcode($the_page->post_content); } ?>

Henk blogt

    find('.mxBlogPostCanvas') as $elem){ if($elem->find('.AccordionPanelTab p',0)->innertext == "ID_01"){ $div_id = $elem->find('.AccordionPanelContent',0)->id; $canvas_id = $elem->find('.AccordionPanelTab p',0)->innertext; $canvas = $elem->find('.AccordionPanelContent',0)->innertext; } } $cats_name = ' '; $cats_name = trim($cats_name); $args = array( 'posts_per_page' => 7, 'offset' => 0, 'category' => '', 'category_name' => $cats_name, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'post_status' => 'publish', 'suppress_filters' => true ); //array di post $posts_array = get_posts( $args ); foreach ($posts_array as $post){ $canvas_parse = str_get_html($canvas); setup_postdata( $post ); $post_excerpt = strip_tags(get_the_content("")); if(false){ $post_excerpt = substr("$post_excerpt", 0, 250); } $post_excerpt = $post_excerpt.'...'; $post_featured_img = get_the_post_thumbnail($post->ID,'full'); $post_title = $post->post_title; $post_comments_count = wp_count_comments($post->ID)->approved; $post_author_name = get_the_author_meta( 'nickname', $post->post_author); // Generate categories list $post_categories = wp_get_post_categories($post->ID); $categories_list = '
      '; foreach ($post_categories as $category){ $categories_list = $categories_list. '
    • ' . get_cat_name( $category ).'
    • '; } $categories_list = $categories_list . '
    '; // Generate tags list $post_tags = wp_get_post_tags($post->ID); $tag_list = '
      '; foreach ($post_tags as $tag){ $tag_list = $tag_list . '
    • '.$tag->name.'
    • '; } $tags_list = $tag_list.'
    '; // Generate post date $the_post = get_post($post->ID); if($canvas_parse->find('.mxCanvasBlogPostDate',0)){ $date_format = $canvas_parse->find('.mxCanvasBlogPostDate',0)->innertext; $post_date = $the_post->post_date; $post_date = date($date_format, strtotime($post_date)); } //Replace image $thumb_id = get_post_thumbnail_id($post->ID); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true); $thumb_url = $thumb_url_array[0]; if($canvas_parse->find('.mxCanvasBlogFeatImg',0)){ $canvas_parse->find('.mxCanvasBlogFeatImg',0)->src = $thumb_url; } if($canvas_parse->find('.mxCanvasBlogPostTitle a',0)){ //Replace title $canvas_parse->find('.mxCanvasBlogPostTitle a',0)->innertext = $post_title; } if($canvas_parse->find('.mxCanvasBlogComments a',0)){ //Replace comments count $canvas_parse->find('.mxCanvasBlogComments a',0)->innertext = $post_comments_count; } if($canvas_parse->find('.mxCanvasBlogPostAuthor a',0)){ //Replace author name $canvas_parse->find('.mxCanvasBlogPostAuthor a',0)->innertext = $post_author_name; } if($canvas_parse->find('.mxCanvasBlogPostCategory',0)){ //Replace category $canvas_parse->find('.mxCanvasBlogPostCategory',0)->innertext = $categories_list; } if($canvas_parse->find('.mxCanvasBlogPostTags',0)){ //Replace tags $canvas_parse->find('.mxCanvasBlogPostTags',0)->innertext = $tags_list; } if($canvas_parse->find('.mxCanvasBlogPostDate',0)){ //Replace date $canvas_parse->find('.mxCanvasBlogPostDate',0)->innertext = $post_date; } if($canvas_parse->find('.mxCanvasBlogPostExcerpt',0)){ //Replace content $canvas_parse->find('.mxCanvasBlogPostExcerpt',0)->innertext = $post_excerpt; } //if($canvas_parse->find('.mxCanvasBlogPostReadMore a',0)){ //Replace Read More text //$canvas_parse->find('.mxCanvasBlogPostReadMore a',0)->innertext = __('Read more...','twentysixteen'); //} //Replace links if($canvas_parse->find('.mxCanvasBlogFeatImgLink',0)){ $canvas_parse->find('.mxCanvasBlogFeatImgLink',0)->href = "post.php?p=".$post->ID; } if($canvas_parse->find('.mxCanvasBlogPostTitle a',0)){ $canvas_parse->find('.mxCanvasBlogPostTitle a',0)->href = "post.php?p=".$post->ID; } if($canvas_parse->find('.mxCanvasBlogComments a',0)){ $canvas_parse->find('.mxCanvasBlogComments a',0)->href = "post.php?p=".$post->ID; } if($canvas_parse->find('.mxCanvasBlogPostAuthor a',0)){ $canvas_parse->find('.mxCanvasBlogPostAuthor a',0)->href = "posts_list.php?mxa=".$post->post_author; } if($canvas_parse->find('.mxCanvasBlogPostExcerptLink',0)){ $canvas_parse->find('.mxCanvasBlogPostExcerptLink',0)->href = "post.php?p=".$post->ID; } if($canvas_parse->find('.mxCanvasBlogPostReadMore a',0)){ $canvas_parse->find('.mxCanvasBlogPostReadMore a',0)->href = "post.php?p=".$post->ID; } ?>