Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

tonyfogarty on "Calling a page from within a page."

$
0
0

Hi,

I hope someone can help. My wordpress knowledge is limited - especially the Codex.

I'm building a page, where I want multiple content sections.

I've been using an 'apply_filters' function to get content, by passing the pagename as an argument. Since I'd like to call it dynamically I'm now stumped.

Here's what I'm after:
A page by the name of 'train' calls page 'train-a' and 'train-b' to incorporate their content into its page. Allowing the user to update 3 different page contents that can be styled in the theme into one page.

A page called 'buses' would call 'buses-a' and 'buses-b' and so on.

I'm writing this into the page template, so that the user can just add other clusters of pages as they need.

As I can't pass the pagename variable as an argument in the function (? I think? - it's not working), I'm lost.

Thanks in advance for any kindly pointers.

Tony

ps... needs to be slug or pagename, rather than ID, as user won't be able to set the page ID, but can set the slug.


Viewing all articles
Browse latest Browse all 8245

Trending Articles