Display a Post AND a Page
-
Hello All.
I’ve set myself the task of migrating this site https://www.2dforever.com/ to WordPress (I’ve chosen WordWress because it seems to have really good documentation and is very open to customisation)
I’d like to display a specified post and page in one document, and keep these dynamic, so for example, I can show the about page with the 136th post (https://www.2dforever.com/about/image136#content).
I tried throwing
/?p=N&page_id=N
at my WordPress URL, but this results in ‘Sorry, no posts matched your criteria.’digging into the source, I find this code in p-includes/functions.php
// First, check to see if there is a 'p=N' or 'page_id=N' to match against
preg_match('#[?&](p|page_id)=(d+)#', $url, $values);
$id = intval($values[2]);
if ( $id ) return $id;This gives me the impression that the page/post seperation is something fundimental to WordPress’ operation, and no simple plugin is going to allow what I want to do.
I’m going to look into modifying this rule to see if I can get both the identifiers to be sent to the templates, unless someone can suggest a better way of going about it without hacking the core WP framework
Thanks.
- The topic ‘Display a Post AND a Page’ is closed to new replies.