Detecting if I’m on a single, non-post, non-homepage page?
The condition is_home() is right, but the condition have_post() in the template page.php will be true because at least one post of type ‘page‘ exist. A page is already a post.
The condition is_home() is right, but the condition have_post() in the template page.php will be true because at least one post of type ‘page‘ exist. A page is already a post.
Ok so few things.. there’s a pretty well coded plugin that handles user roles and permissions: https://wordpress.org/plugins/user-role-editor/ If you’d like to do this programatically though, you should: <?php function wpcodex_set_capabilities(){ global $wp_roles; // global class wp-includes/capabilities.php $role=”editor”; $cap = ‘publish_pages’; $wp_roles->remove_cap( $role, $cap ); } add_action( ‘init’, ‘wpcodex_set_capabilities’ ); ?> Lmk if that does it … Read more
that’s a long issue though, better will be to upload a screenshot of your code to imgur.com and paste the link here so we can check. Rest make you are calling your footer wp_footer() function, if its having footer.php.
WordPress form submit to custom page template does not work
1) your username and password can be admin/admin, but you can remember it by going to: the database -> select the database -> click on the wp_users table and then enter the administrator record and update the password ( function uses md5) Once the key has been changed go to: localhost/myweb/wp-admin/ Enter the user and … Read more
I think it’s not the wp-config.php or .htaccess file you need to edit. The problem is web server related. search for php.ini file in your web server directory and there are some specific limits you may need to configure. like following keywords: upload_max_size’ , ’64M’ post_max_size’, ’64M’ max_execution_time’, ‘300’ I hope it helps and feel … Read more
Use page-templates without creating theme
It seems all I needed to do was put in the template_part get_template_part( ‘template-parts/page/content’, ‘page’ );
Cannot pull WYSIWYG content
$wp_query->post_count is supposed to work exactly like that. To get the total number of posts that exist in the database, use $wp_query->found_posts