WordPress does not know the parametrs i sent to admin post

You’ve got an expected error because I cannot find any input field with kind name. There’s only action, region and street no sign of kind! Notice: Undefined index: kind in /home2/khiyabou/domains/khiyaboun.ir/public_html/wp-content/themes/khiyaboun-1/examplefile.php So the above error is a perfect error in this situation. Please rewrite your callback function like the following. Hope that’ll work // It’ll … Read more

How to create more templates to the same theme?

Create .php file with name like template-blogs.php, inside file write a Template Name in php comment, include header & footer. here is the sample of test template <?php /* * Template Name: Test Template */ get_header(); ?> <div class=”content_area”> <!—Write Your PHP Code Here—> </div> <?php get_footer();

Adding php within a return statement [closed]

You can just call PHP functions directly. In this case however we possibly don’t want to call the_permalink() since it echoes out the link: function the_permalink( $post = 0 ) { /* … */ echo esc_url( apply_filters( ‘the_permalink’, get_permalink( $post ), $post ) ); } whereas we want to return the link in a string. … Read more