I want to show some content based by tags of a user, that is how i would like to do it, but it did not work:
$args = array($arg1,$arg2,$argn);
function show_tag_content($path){
$post = get_page_by_path($path);
$content = apply_filters('the_content', $post->post_content);
echo $content;
}
for ($i = 0; i<count($args);$i++){
show_tag_content('blog/tag/' . $args[$i]);
}
tried the function with a hard string without using blog and more than one page content, e. g.:
show_tag_content('login');
show_tag_content('news');
works perfect, tried it that way:
show_tag_content('blog/tag/example');
nothing
Need some help here at this point
var_dump($post);
after usingget_page_by_path($path);
to see what is the function returning.