All the pages are blank [closed]

The problem was with the theme of the website. So the error was here: /home/—/public_html/wp-content/themes/ifeaturepro/page.php on line 15 Here is the correction: echo ‘<script type=”text/javascript” src=”https://use.typekit.net/ngr4yya.js”></script>’ . “\n”; echo ‘<script type=”text/javascript”>try{Typekit.load();}catch(e){}</script>’; Strange. The person that coded the theme put HTML in the PHP.

Custom admin menu for a selection of pages

Approach 1: You could assign the role of “editor” to the user, assign the user as author of the three pages and thereafter limit the user to editing only those three pages by following this outlined methodology: http://www.godaisies.com/2010/08/23/how-to-make-editors-only-able-to-edit-their-own-page-in-wordpress/ This however does not fulfill your requirement of a dedicated custom admin page. It simply limits what … Read more

making a pseudo-static page

Create single.php in your themefolder and insert this code get_header(); ?> <div id=”primary” class=”content-area”> <div id=”content” class=”site-content” role=”main”> <?php /* The loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( ‘content’, get_post_format() ); ?> <?php twentythirteen_post_nav(); ?> <?php comments_template(); ?> <?php endwhile; ?> </div><!– #content –> </div><!– #primary –>

Page can not be updated and disappeared in “show all page”

You can try to repair your database. To do it, please read this answer in StackOverflow. If repairing database didn’t worked, you can try to update the post status manually. Connect to your database Find the page in the wp_posts table (you can find it through the post_title field) Update the record running a script … Read more

Grabbing the_content from “about us”

You can use get_page_by_title() or get_page_by_path() to retrieve page object that will have title and content (which you might need to further process a bit, depending on how complex it is). And if I remember right get_the_post_thumbnail() gives you featured image.

disable trashability for certain pages

Add this to your functions.php in your theme folder: function restrict_post_deletion($post_ID){ $user = get_current_user_id(); $restricted_users = array(21,25,54,2,19); $restricted_pages = array(2,21,52,64); if(in_array($user, $restricted_users) && in_array($post_ID, $restricted_pages)){ echo “You are not authorized to delete this page.”; exit; } } add_action(‘wp_trash_post’, ‘restrict_post_deletion’, 10, 1); add_action(‘wp_delete_post’, ‘restrict_post_deletion’, 10, 1); Taken from here and updated to the latest WP version.

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