Make ‘blog’ page show content as well as posts underneath it

Edited answer Thank you for you clarification above, and please give this a try – Note – This code assumes that you are using page.php, a variation of the page templage or some other custom template – it will not work on your index page (index.php). <div id=”page-<?php the_ID(); ?>”> <?php if (have_posts()) : while … Read more

Injecting pre-defined text from custom page template to editor

The code below will work, read inline comments. Paste it into your theme functions.php or plugin. The only problem with this is the it will only work when the template is selected and the post is saved/updated and the editor is blank. <?php function wpse_177576_update_editor_content( $post_id ) { if ( wp_is_post_revision( $post_id ) ) return; … Read more

Unique PHP on each Page

Rather than insert PHP scripts into each page what you could do is execute PHP scripts using action hooks with conditional tags or modify the default output of an existing function using a filter hook with conditional tag for each page. You could also create template tags or write your own functions in a separate … Read more

Custom form not showing in correct place on page

When working with shortcode you must return a value rather than output directly. The below amendmetn should fix your positioning issue. For more informaiont, see the Shortcode API Codex, speciffically the Output section. function multipage_form() { global $wpdb; $this_page = $_SERVER[‘REQUEST_URI’]; $page = $_POST[‘page’]; if ( $page == NULL ) { /** * first name … Read more

Only echo Page Content (not page title & page content together)

You can make use of the_page_content() outside the loop to display only the content of the page where the_page_content() is supported by the following function function the_page_content() { global $post; $content=””; if ( is_page() ) { $content .= apply_filters( ‘the_content’, $post->post_content ); } echo $content; } Inside the loop you can just use the_content();