Remove Content edit box from ALL pages (not posts)

Found the following solution which works to remove the content editor from all “page” content. Just chuck it in the functions.php file add_action(‘admin_init’, ‘remove_textarea’); function remove_textarea() { remove_post_type_support( ‘page’, ‘editor’ ); }

No Appearance panel is shown

You are accessing your hosting server panel. There is no way you will find Appearance tab there. Go to this URL: http://yourdomain.com/wp-admin to access your WordPress Dashboard. You can view the Appearance section there.

My custom template page not loading content inside it?

you have to use the WP Loop to get page content. Try this <?php /* Template Name: home */ get_header(); ?> <div id=”theme-main-banner” class=”banner-three gradient-banner-three”> <?php while(have_posts()): the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> </div> <?php get_footer(); ?> UPDATE The issue was that front-page.php was already present in the theme. So as per the … Read more

IF user is logged in only show certain page

Big Question. So, first, to keep the galleries separate, it would be good to give them their own custom post type. We’ll be checking for this later… <?php add_action( ‘init’, ‘wpse32840_register_post_type’ ); function wpse32840_register_post_type() { register_post_type( ‘client_gallery’, array( ‘label’ => __( ‘Client Galleries’ ), // probably needs better lables ‘public’ => true, // allow people … Read more

External stylesheet per page

This approach (one general css) will make your first-load times longer, but when you browse other pages, if the css is cached, everything will be faster. If you make your stylesheet smaller by splitting them up.. you might have a ‘slightly faster’ first-page load but every other page that uses another css will still be … Read more

Suddenly forbidden 403 error on some pages

Please check the permissions of files and folders. All folders should have permission set to 755 and files should have 644 . If permissions are different than specified, please try changing the permissions. You can easily check and change permissions using filezilla. Let me know if it helps.

Custom page template for multiple pages

You can always make use of the page_template filter to tell WordPress to use a specific page template for all child pages of a certain parent. It is as easy as creating a special page template, lets call it page-wpse-person.php. Now it is as easy as including that template whenever a child page of people … Read more

Get the ID of the direct parent page

I’m assuming that you’re asking how to do it with code? (Doing it in backend is pretty easy – just try to edit parent page and see the ID in URL). So how to check post parent in code? It’s also very easy – direct parent is stored in post_parent property. If post has no … Read more

Pass data from one page to anothe file/page in wordpress

You can try to use functions.php to handle the form submission and send the data via AJAX. Add a hidden field in your form with the action to be taken (on functions.php): <input type=”hidden” name=”action” value=”save_contact”/> In you footer.php add the jQuery code to handle the AJAX request: jQuery(‘#your-form’).submit(ajaxSubmit); function ajaxSubmit(e){ e.preventDefault(); var formData = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)