How to get specific multiple pages excerpts at homepage?

It looks like your loop is running through all the posts, your array of post id isn’t getting passed. However, you may be able to make the call using this code Get excerpt using get_the_excerpt outside a loop tl;dr $text = apply_filters(‘the_excerpt’, get_post_field(‘post_excerpt’, $post_id)); https://wordpress.stackexchange.com/a/150005/26744

Form checkbox value going to dynamic URL

I am no expert but you are submitting multiple checkboxes with the same name attribute. Your current form GET action will return the url params like this for example… http://www.urltoshow.com/ville/paris?style=Classique&syle=Luxe So because there are 2 usages of param style in the url above, it means PHP $_GET[‘style’] will only return the last getted param value. … Read more

sanitize_post() is not sanitizing Post Object

Solution: sanitize_post is coming with “display” default filter option. And it does not sanitize tags. But if you tries a code like this: $sanitizer = function($post){ return sanitize_post($post, “db”); // or “edit” }; array_map($sanitizer, $data[“post”]); Now it sanitizes fields against XSS!

Show child by slug, while knowing parent ID

this is how i solved my problem: <?php $pageid = $post->ID; $pageslug = $post->post_name; $pos = $post->post_parent; $posname = get_post_field( ‘post_name’, $pos );; $arg1 = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, ‘pagename’ => $posname.”https://wordpress.stackexchange.com/”.$pageslug.’/infraestructura’, ); $child = new WP_Query( $arg1 ); ?> <div class=”wrapp”> <?php if ($child->have_posts()) :?> <?php while ($child->have_posts()) : $child->the_post(); ?> … Read more