How can i hide the authors box from a specific set of categories and post types?

This depends on your theme. If it has no option for this, you’ll have to do this yourself. Find the template where the author box is generated (presumably single.php) and copy it to a child theme. Then make the production of the box conditional to the current category; if (!is_category (array (‘exclude-this-category, another-category-to-exclude’)) { echo … Read more

How to use esc_attr__() function properly to translate a variable that contains string?

If you have static text with dynamic content then you can use. printf( esc_attr___(‘static text goes here with %s’, ‘text-domain’ ), $title ); If you have only $title then no need to translate it. Just escape it. echo esc_attr( $title ); Note esc_attr, esc_attr__ and esc_attr_e used for escaping dynamic values from HTML element attributes. … Read more

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();