Wordpress lets you create pages that contain static content. The Talks and About pages on this blog are two examples. Unfortunately, until now you could not include posts inside of these static pages. With my new Inline Posts Wordpress Plugin (version 2.1.2g) (2KB), you can!
See the SWX Showcase and SWX documentation pages on swxformat.org for an example of the plugin in use.
In a nutshell
Download and install the plugin and you can include posts in pages (and other posts) by entering the Post ID surrounded by double square brackets ([[nnnn]] where nnnn is the numeric ID of the post you want to include).
Why include posts in pages?
The ability to include posts in pages is something I've felt the need for several times in the past. Basically, the idea is to use posts as sections within a page, with the post title appearing as the section header.
Most recently, I wanted to create the SWX documentation for the SWX homepage as a series of blog posts. This way, each section could have comments on it and I could easily update a single section by editing a post and change the order of sections on the page by changing the order of simple tags that correspond to the posts. I could also show atomic last-modified info for each section so it would be immediately obvious if any sections drift woefully out of date (something that can easily happen to long pieces of documentation).
Since this functionality didn't exist (and believe me, I searched far and wide on the Internets), I decided to roll up my sleeves and try my hand at creating my first Wordpress plugin. It was not a difficult process once I tracked down the hook I needed to latch onto and blew the relearned regular expressions for the umpteenth time.
Installation
- Download the Inline Posts Wordpress Plugin (version 2.1.2g (2KB) and unzip it into your wp-content/plugins/ folder.
- Log into your Wordpress administration panel, click the Plugins tab, and click the Activate link for the Inline Posts plugin.
Using
- Start writing a new page (or edit an existing page)
- In the place on the page where you want to include a post, enter the ID of the post, surrounded by double square brackets in the form [[nnn]].
That's it!
You can also include posts in other posts using this method (though I'm not entirely sure why you would want to!) And, since pages are really just posts (confused yet?), you can use the Page ID to include a page in a post or a page in another page too if you really feel like that will make your life better!
To see an example of it in use, look at the Wordpress page on this blog as you will see this post included in it. Note that this is the first version of the plugin and I'm testing it out as I go. It's only been tested (and not much, at that) on Wordpress 2.1.2. I've tested it on 2.1.2, 2.3.x, and it's running well on 2.5. That said, use at your own risk!
I hope this plugin will be as useful for you as it has been for me.
Related plugins
If you'd like your wonderful new pages to show up in searches, install the Search Pages 2.0 plugin. The two plugins work together well but you will get included posts returned as well as the pages in which they are included (which is expected behavior). Even if your pages are entirely made up of posts, having them show up in searches within the context of the page is still useful.
Finally, you may not want the posts that you include in pages to appear on the front page of your blog (or perhaps, not even in your site's feed or in the archives). You can exclude inline posts from these places by using the Ultimate Category Excluder (UCE) by Kyle Slattery. Install this plugin and then put all the posts that you don't want to appear on the main page in a separate category (on SWXFormat.org, I chose "Documentation" as the category to exclude). Then, in the Options panel for UCE, check the "Exclude from Main Page?" option next to that category.
Known issues
For some reason the number of comments on a post is not displaying correctly on Wordpress 2.0.2 (on this blog). It does display correctly with 2.1.2.
Changelist
- Version 2.1.2g: (August 28, 2007) Added automatic table of contents (TOC) creation for pages. If you want the TOC included in a page, use the tag [[ TOC ]] (without the spaces). Also added Top anchor links for easy navigation from TOC to topics and back.
- Version 2.1.2f: (August 27, 2007) Anchor tags are now added to topic headings so you can link to specific topics on a page in the form: http://myblog.com/somepage/#post_id as in the following example: http://swxformat.org/documentation/#85).
- Version 2.1.2e: (August 25, 2007) The plugin now removes HTML comments and the linebreak before the initial double bracket so that these don't cause Wordpress to display additional <br /> tags in the output.
- Version 2.1.2d: (August 25, 2007) Raised priority of the plugin so that it doesn't conflict with other plugins like the CodeHighlighter plugin. Also removed an error_log trace that would have resulted in large log files (the plugin no longer outputs any debug information).
- Version 2.1.2c: (August 24, 2007) Added "Edit Topic" links so you can edit an included post in a page without having to click through to that post first.
- Version 2.1.2b: Added admin panel and option to set the tag that the titles of posts are displayed in (h2, h3, etc.)
- Version 2.1.2a: Changed default tag to [[nnn]] from [nnn].
- Version 2.1.2: First release.
License
The Inline Posts Wordpress Plugin is released under the open source MIT license.
The Inline Posts Plugin for Wordpress article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
Download link for inline posts zip is 404.
Sorry, Nancy! I’ve fixed it now
I think this may be exactly what I’m after. Does this work the other way around too, i.e. can I include the contents of a page in a post?
Just a heads up: I’ve updated the plugin to version 2.1.2.a (I’m keeping the latest Wordpress version its tested with as the main version and tacking on a letter for the revision).
With this version, you need to use *double* square brackets. This is so that it doesn’t conflict with array syntax in code if you have code samples. Previoulsy, something like var a:Array = [2]; caused post 2 to be included.
Please use this latest version, especially if you have code on your blog.
@Olly:
Pages are really just posts, so yes: If you include the Page ID in a page or a post, you will get the page included too.
Wonderful, thanks. I’ll give this a try later
Nice plugin! Thanks!
Update 2.1.2b gives you the ability to set the tag that you want to use to display the titles of posts. It defaults to a H2 tag.
Hey aral, thx for that.
I was looking for this for ages now
I will try using it with
http://wp-plugins.net/plugin/Programz/
too
It should rock
Argh! This is exactly what I needed when I designed a new site with WordPress a month ago!
On my personal site, http://stevemooradian.com , I used pages/posts within pages to control all my content sections via the tremendous WP admin interface. Because I didn’t have this friggin’ awesome plug-in, I had to relate sub-pages to parent pages by the “post category”. Your plug-in makes this MUCH MUCH MUCH cleaner. I want to shoot myself.
This plug-in is really an absolute must when using WP for any CMS type site. WP is an obvious choice due to the familiarity most web-savvy developers have with this great blogging platform, and due to the easy-to-understand admin interface that makes it updateable by
simpletonscustomers.Great plug in Aral! Steve don’t shoot yourself, just use it next time.
Hey there,
i downloaded your plugin into plugin directory but it is not showing in the plugin tab in admin section.
can you plzzzzzzzzzzz help me out. i downloaded it twice. but doesn’t work
i am working on wordress 2.2.2
plz reply asap
minal
Hi Minal,
I don’t have 2.2.2 installed currently so I’m not sure if that’s a problem with that release. Have you unzipped the file that you downloaded?
Question, could this be changed up to work off category id’s instead of post id’s? Say for example you you post something in a particular category and you want a page to reflect everything that is posted in that category.
Hi Craig,
It’s definitely possible to do what you are asking (include all posts in a category in a page) and I do see the use in it (I was thinking that’s how this would work initially, but then I realized that I wanted control over the order in which posts appeared).
Actually, the ability to display all category posts is built in to Wordpress so a separate plugin to display all category posts as a page should be very easy to write. I don’t think I’ll have time to get round to doing this though.
Great plugin!! I have a question though. When I create a post it shows up in the “main” blog page. I can add it to other pages without any trouble using the [[x]], but how to I get the post to ONLY show up in that page and not in the “main” blog page?
Thanks!!
Hey Aral,
Your stuff is working great. there was some minor error which got sorted out.
However now my problem is that with ur plugin our posts show on the other Page that we want to but they even show on the homepage of posts. I mean they r duplicated. Can i have the posts show up ONLY on the Page I want and no where else??
That would be great help actually
I am working on my school’s website- http://www.devashishsankul.com
If you visit the website you will notice that the ‘What’s New?’ page has been allocated as the posts page. But what I even wanted the student’s to write posts and those posts to show on ‘StudentSpeak’ Page.
Now with Inline Posts it does happen but the posts even show on the What’s New page. So then it does not make sense. Please let me know if i can do something about it.
Thanks for such a beautiful plugin!
Minal
Hi Minal,
The best way to try and achieve this would be to tag a post with a specific category (wish they called them tags, really, in Wordpress) and then filtered to not have posts in the category displayed on the blog.
I found a plugin called Category Visibility that does this but apparently it doesn’t work in Wordpress 2.1 and above.
I want to write a plugin to do this but I’m not sure I’ll have the time before my hectic conference speaking schedule kicks off this month.
Maybe there already is another plugin that lets you do this? If you find one, please let us know here too!
Hi Minal,
OK, I found the plugin we need, it’s Ultimate Category Excluder (UCE) by Kyle Slattery.
Install this plugin and then put all the posts that you don’t want to appear on the main page in a separate category (on SWXFormat.org, I chose “Documentation” as the category to exclude). Then, in the Options panel for UCE, check the “Exclude from Main Page?” option next to that category.
You can see the plugin in action on the SWX homepage.
Is there a way to display categories contents on specific pages?
Hi Neil,
Unfortunately, not with this plugin. In fact, I’m not sure how it would work in any case (or what additional utility such a thing would provide), as a category display is already included in Wordpress. And, with a category display, you wouldn’t have the flexibility of ordering the posts (unless it supported sort order filters on specific attributes).
Hi Aral. Really liked your plugin. I hope you don’t mind, but I used it to build another one. You can check it out here:
http://www.meramenteilustrativo.com.br/wordpress/
or see it in action here:
http://www.meramenteilustrativo.com.br/trabalhos/
What it does now, is it allows you to add all posts in a particular category at once.
Would like to hear from you. Maybe we could share some ideas on how to make it even better.
Hi Rodrigo,
That’s really cool! Someone was just asking about category support.
Hi Aral!
Fantastic Plug-in!
I have a question:
How do I remove the following from showing up along with my post:
“Last modified –. — comment. Top.”
I’d like to keep my posts simple and clean on the page.
Also, is there a way to only show a limited amount of text from a post, such as up to where the “” tag is used?
Thanks!
Okay total novice here, I downloaded Inline tonite, and its installed, the newest version. Do I write the location of the page [[5]] in the visual or code part when I write a post, I tried it and it didn;t show up anywhere. Second question what was the improvement made on the first version? Thanks very much. TS
Hi just wondering if there is anyway to get this great plugin to work the ‘more’ tag?? thanks in advance!
Dali:
In the plugin’s php file, I commented out the following:
''.$lastModifiedText.' '.$commentsText.'. '.$topLink.'. '.$editLink."".That left me with an open “a” tag (following an “a name=” tag), so I added the editLink and the topLink back in below the comment:
''.$topLink.''.$editLink."".Not very elegant, and it doesn’t strip out all the metadata (Top is still there), but it does get rid of most of it
Aha. Found the source of the open “A” tag, so I don’t need the toplink with its closed tag to close the open one.
Comment out the lastmodified and etc, as described above.
Then look a couple lines up in the code for:
$postTitleText = "<$titleTag>$linkToPost$postTitle$anchorTag</a></$titleTag>";
To fix it up, drop another </a> tag in after “$postTitle”:
$postTitleText = "<$titleTag>$linkToPost$postTitle</a>$anchorTag</a></$titleTag>”;
A little cleaner than my previous effort.
Hey Aral!
I was looking for a plugin/hack to include all posts of a category of your choice on a page (yes, i know: ‘Category/catName’ does that, but I wanted something where i can put some more info).
I knew about your plugin so I thought I might adapt it to my own needs, and so I did.
I change a few things, and added a function.
It now checks for [[cat:15]] -like tags, replaces it with all post-tags in that category, and then continues to your function where posts are included into the page/post.
I just wanted to thank you for your work again
If you’re intrested, I’ll mail it to you 
Greetings
@Lars: Glad to hear that you figured it out. I will try and find some time to add this to a future version of the plugin.
@Ronny: Very cool. Why not make it available for download?
@Aral: I actually wanted it to be posted by you, since you actually did the actual work. I’ve put it online on my site now, but if you wish so: Feel free to make it available here
Keep up the good work!
Donwload page: http://www.nocreativity.com/blog/inline-posts-en-categorieen-powered-by-aral-balkan/
Hi Ronny,
That’s really cool of you
I’m a real fan of decentralizing stuff though. It’ll be easier for you to post updates/etc. if you do it all yourself
I’ll link to it of course!
Hi there Aral,
The plugin sounds GREAt. Still…I do not know why BUT there is NOWAY I can make your plugin to work. I have wordpress 2.3
I write in the page: [[]]
What I get on my code view is: [[<6>]]
And then nothing happens: [[]]
Any suggestions? Thank you
If the code doest look right have a look here: http://aenaon.info/toget/screenshots/01post.jpg
Hi,
You shouldn’t be using angled brackets, just two square brackets. Hope that fixes it!
It doesn’t work for me at all. Yes, I’ve unzipped and the plug-in is activated.
If I want to include id 5, I should write [[5]], right?
Nothing else? Am I supposed to write this in “visual” or “code” mode?
Or is it somewhere else? In the loop or what?
thanks
I love the plugin and it worked fine on my local server but when I ported the whole site to the live server every time I activate the plugin I get a blank page with:
“” (2 UL tags)
and nothing more.
You know what the problem could be?
Hi Martijn,
Sounds like an issue with your deployment server. Are you seeing any errors in the error log?
It’s a windowsserver and I now have problems with another wordpress site on that same server. Now just hope that I can persuade my client to switch servers.
We recently featured your plugin on our website wpcandy.com and a person named Jai commented about on the fact that if you have a post that has the MORE tag in it, when using your plugin to put the post on another page it does not display the MORE tag.
I thought this was a very good find and perhaps in later versions there maybe a fix for this or an option to include the MORE tag or not.
Thanks Michael.
Thanks for the bug report Michael, I’ve made a note of it and will look into it. (Thanks also for featuring it on your site)
You are quite welcome
Aral,
I can’t get Options > Inline Posts > Title Tag to work. No matter what I put into the “
I can’t get Options > Inline Posts > Title Tag to work. No matter what I put into the text-entry field nothing happens. What is the format for the code to enter? I’m using WordPress 2.3.
Thanks!
Would it be possible to change the time format to the one my blog page uses? Aswell as add posted by author and posted in category? I have tried and have had some luck with author but it is always glicthy. Ie I am trying to skin this post exaclty the way the blog page skins the post? Could we not just call up the commentform and title from the single.php?
Could you update this for 2.3? I really like it and it seems to be the only thing out there like it. I’m surprised it’s not pur of wordpress now. Anyways, when I activate it it makes my text spread out into the sidebar. Thanks in advance for any help you might give.
@Mike, @Dave: Hey guys, I’m currently on the road, speaking at a conference in LA. I’ll look into making this work with WP 2.3 (after I upgrade to it!) on my return — apologies in advance if it takes a little while
@Dave: Yep, I agree, it would be very nice to see this become part of Wordpress.
I absolutely love this plug-in, but I’m also wondering if there’s any way to edit it so that I can use a similar timestamp and “By Name” format that I use on my primary blog page? The page has multiple authors, and it would be great if at least the author name can show on the timestamp at the very least. Again, I really appreciate the plug-in, thanks for creating it!
Thanks Aral !!
This is just what I was looking for…
Hi Aral,
figured out how to use it… wasn’t too tricky.
On my sermons page, http://fbcwaynesboro.org/wp/sermons I have included sermon notes and broken with more tag. Now, with the inline posts plugin, the posts appear on the sermon page, with full text of note, and no mp3 file to play, unless you click on the individual post.
I’ll play around a little more;l but I’d like to see an excerpt of the notes, with the sermon MP3 file that could be clicked on and played on the sermon Page. If people wanted to read more, they could go to the full posts.
Any advise?
Thanks again, this is a really needed plug!
Oh…. one more thing, I’m using podPress.
Hi Dave,
I just upgraded to Wordpress 2.3.1 and I’m not seeing the issue you’re describing (it’s working perfectly for me.) Could it have something to do with the theme you’re using, I wonder.
Thanks for posting back Aral, perhaps this is theme-related… I’ll take a look there. This is a great tool! Thanks again
Hi again Aral…
would it be incredibly difficult to somehow modify this to insert code for a single category… rather than single posts?
I have been trying to figure out a way to use a conditional tag; so far, your plug has been the only thing that really works; it just requires going into the page and adding the tag fo each post added… seems like this could be tweaked; although… I’m really not a pro, in fact, I’m still a beginner with WP!
Thanks again!
Hi All, hi Aral,
I suggest to add these lines to Aral code to show all posts of a category. You have to write category ID number in brackets, instead of post ID number. I hope this help. It is the only way to merge pages and categories. I think to add static code page to category template it not a suitable for general users.
// Get the Post IDs to include. Post IDs are in the form [nnn].
preg_match_all(’/(?ID;
$i = $i 1;
endforeach;
Hi All, hi Aral,
I suggest to add these lines to Aral code to show all posts of a category. You have to write category ID number in brackets, instead of post ID number. I hope this help. It is the only way to merge pages and categories. I think to add static code page to category template it not a suitable for general users.
// Get the Post IDs to include. Post IDs are in the form [nnn].
preg_match_all(’/(?ID;
$i = $i 1;
endforeach;
…
//add $text.
$text = $text.$postTitleText.”.$lastModifiedText.’ ‘.$commentsText.’. ‘.$topLink.’. ‘.$editLink.”".$postBodyText.”\r\n”;
…
and move the replace placeholder line out from the for code
bye, Massimiliano
Sorry for problems including code in my post. Please find the function at this link. http://www.margaron.it/d/massimiliano.txt
MM
Hi Massimiliano,
where exactly does this function need to go?
I think I follow you; but just needed a little more detail.
Thanks, David
Hi Aral,
I am a total newbie to wordpress and landed on your page because i wanted to include posts in a page.
Your plugin sounds fab… but my first question is where can I find what version of wordpress i am using?
does this work for blogs at xxxyyzz.wordpress.com?
and lastly if it does work for the my sort of blogs where can i find the wp-content/plugins folder?
I knw i am a total newbie… but don’t know where to go for help!
Esha
I followed the directions to the letter. It doesn’t work at all for me. I am using a very recent version of wordpress. I just get a bunch of bracket characters and the like.
Hi David,
the modification works fine for all sites. You have to replace the function you find in my txt file http://www.margaron.it/d/massimiliano.txt, inside the Aral php file (in other words, you have to find this function inside php code and replace it, but don’t touch the code before and after). Then install the modified plugin following Aral instruction. That’s all!
Massimiliano
Hello all, I found the Inline Posts plugin (thanks very much Aral) after wanting to include posts within a page. After thinking my project requirements out, I realized I wanted to display a specific category of posts and decided to use Rodrigo Rutkoski Rodrigues’ Composite Post plugin along with the Improved Include Page plugin.
Ideally, what I want to do is remove as much of the coding side of things from the client as possible and make their site really easy to edit.
I wanted to have a listing of News posts displayed on the Home page of the site and remove the need to put the inline posts code within the Home page because this would look a little sloppy…
So, I created a News Page and put the inline posts code there to include my entire news category. Then I used the include page code to include my News page in the desired spot in my page template if and only if a user is on the Home page.
If the client has new News to post, they just create a new post and it will appear on the Home page!
I guess it’s still a little sloppy having the inline posts code in the News page, but I thought it less sloppy than having it in the Home page where they will be more likely to edit the text. I’ll just tell them to not edit the News page!
The only thing I’m missing in my setup is the ability to control how many News posts are displaying… I haven’t really taken a look at the Composite Posts code too heavily but there must be a way to do this (somehow in the // select posts from category section). Say I wanted to limit the # of posts displayed to 3 so the News section on the Home page doesn’t end becoming a huge list. Anybody have any ideas?
I’d be glad to share more about how I implemented this if anyone wants to know.
Cheers,
Jonah
Hey it’s me again, I just figured it out - 5 minutes after I posted my question!!! To limit the number of posts returned in the Composite Posts plugin just find line 111.
Change:
$posts = get_posts("category=$catId");To this:
$posts = get_posts("category=$catId&numberposts=3");I just added &numerposts=3 to the get_posts function. You could change 3 to any other number.
This is just the regular WP get_posts() function and you can use all the other arguments too!
Cheers,
Jonah
Hello,
great plug in. Installed without a hitch. My question is the same as Trevor’s above. When adding a post, I want it to go directly to a subpage and not display on the Homepage. They way it is now, I create a post, note the post id. Then [[x]] the post on the page I want it. Then it still shows up on my home page. Any way around this?
To Eric and Trevor: To achieve your request you would need to modify the way the wordpress loop is returning posts. You can exclude certain posts from the main loop via information on this page - http://codex.wordpress.org/The_Loop
Search for excluding posts, its pretty easy to implement. If you want to exclude the posts returned only on the home page you will have to step into Page Templates and create a specific template using the exclude code above for the page you want to exclude posts from and then an ordinary template for your other pages where you don’t want to exclude posts.
Wordpress is a very flexible system and if you just search around a bit and read some of the documentation on how it works you will understand a lot more.
Good luck!
hi, really nice plug-in (i include post in post, post in page, page in post…funny!!!)
a single question, there is a way to include only the first part of the post BEFORE the — more — option?
thank you
Awesome plugin man! Thank youuu!
Great plugin. I scanned the comments above to see if the “more” tag is available. It would be great if that option could be included. Thanks for writing such a useful plugin.
Awesome plug-in !! I’ve been hacking away all week trying to find a solution to this problem - cheers.
Aral, does it automatically re-write the H1 header tags as H3’s or is that a manual task in creating the composite page (eg: “showcase”)
Hi,i try to install on WP 2.3.1,but it not working, will it support 2.3 and above?
@barry.b: You can choose which tag is used for titles in the administrator, under Options -> Inline Posts.
@apad: It’s running correctly here (http://aralbalkan.com/wordpress) under Wordpress 2.3.2. What’s the error you’re getting?
Hi,
I am not sure if you can help I run http://www.wearevilla.co.uk I am pleased with my blog page but I want to say post a post and it go to the news page as well as the home page any ideas?
This plugin is the solution for my site. It really works great. However I have a problem. If you got to http://www.linux.dropbike.com/ you will see that black bar accross the page that does not belong there. It includes the last post. It only happens when the plugin is activated. It happens with other themes as well. Not in the same way, but something gets messed up. WP version is 2.3.2 and plugin version is 2.1.2g
Thanks
@Kevin: Just use the plugin. It does exactly what you describe!
@Marko: I can’t see the black bar. Can you send me an email to aral at this domain with a screenshot (or, if you can activate it and let me know, I’ll check.)
Aral,
Firstly, thanks for a great plug-in! I have a few questions, why wont my post’s formatting get carried over to my new pages? I post the most recent post on my main page and then [[nnn]] it into my appropriate page, but I lose my original post formatting.
I work hard on my post formatting, and my photos in the posts, why won’t they show up like that in my new pages? I love working with this plugin, I just need my posts to look like they do when I originally write them!
Thanks again Aral, we all appreciate your time!
Great Plugin!! This will be getting reviewed on my site very soon as I think people really need to hear about this one.
@JoNathan: Thanks! Looking forward to reading your review
Aral, thanks for this wonderful plugin. I was looking for something like this for a long time.
Firstly,people who were interested in making posts show ONLY on a particular page and NOT on the home-page can use the ShowOnFrontPage plugin. The URL and more instructions can be gathered from http://www.richardgoodwin.com/wp/2005/01/08/new-plugin-showonfrontpage/.
My Wishlist for the Road ahead.
Wishlist
1)All articles posted to a specific designated category get automatically posted in a section.
2) All articles posted to a specific designated category DO NOT get displayed on the home-page (optional)
3) I would also like to see pagination on the page where the Inline posts plugin has been implemented.
4) What one really needs is some kind of a dashboard in the Options area of WordPress so users can tweak the settings according to their requirements.
I am implementing this plugin on my website and would like to come back here for your thoughts and advice.
This is a great plugin in concept. I do, however have some thoughts about how to improve it (which I might work on myself and submit my code to you and/or publish a modified plugin of course giving you full credit (with your permission). The main intent I think here is essentially to have all other pages just like the main page, with their own chronological posts. I don’t want the posts to appear on the main page, which I took your advice and used the UCE plugin for. However, I would like the Recent Posts on the main page to include posts made on other pages which it doesn’t using the IPP/UCE combination. Second modification I would make is rather than have to hard code the post id into the page, modify the template for the manage->posts themselves to include a widget on that page that allows you to choose on which page(s) that you would like the post to appear. E.g., call the widget box “Pages” and list it to the right above Categories by default. Let me know your thoughts. Great job!!
I couldn’t get UCE to work with WP 2.3.2, so I kept looking for other options. I might’ve found something that could work for you, Sean. Check out http://zeo.unic.net.my/notes/exclude-category-in-wordpress/. This uses a function to hide a category and works in WP 2.3.2. BUT it still counts the hidden category on the home page. So, if your “show at most” is set to 10 and you’re hiding 5 categories, only 5 categories will show up. However, the posts to that hidden category do show up in the “recent posts” list.
Thank you Aral for creating the Inline Posts plug-in! It’s perfect for blogs within blogs!
I am using this wonderful plugin for a book review/summary blog within my blog. Since I am rather verbose, those reviews are long and I’d like to use the “more” feature to avoid including the whole posts on the page (see http://www.rabe.org/book-summaries/). Unfortunately, like many others here, I cannot get “more” to work. I gathered from the discussion that this is theme related, so I dug into my theme to try and figure it out. Well, I couldn’t. This is the loop I am using: (let’s see if I can get the code to post…)
< ?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h2 id=”post-< ?php the_ID(); ?>“>< ?php the_title(); ?></h2> < ?php the_content("Continue reading " . the_title('', '', false)); ?> < ?php wp_link_pages(); ?> < ?php edit_post_link(__('Edit'), ' ‘, ‘‘); ?> < ?php endwhile; endif; ?>I thought that the_content() the way it’s used here allows me to use “more” but it’s not working and I have no clue why. Does anyone have any suggestions?
Thanks so much!
Rachel
Aral: One suggestions about the plug-in - you might want to consider including a footer that’s automatically added to a page that’s using your plug-in that gives you credit… I’ve manually added that to my page…
[Edit: Aral][I just added the code to your post, above, Rachel. Thanks so much for your kind words and for adding the credit line to your blog — I appreciate it! :)]
Oh, I was afraid the code wouldn’t post right… Let me try again…
<h2 id="post-">
<?php edit_post_link(__('Edit'), '', ''); ?>
I apologize but I am obviously not getting this to work… I am using the code tag… So let me just post the function:
the_content(”Continue reading ” . the_title(”, ”, false));
If you need to see more, please let me know how to post that… Sigh.
Whoa! This is teh total awesomeness!
I didn’t even know this is what I was looking for (I’m kind of code-challenged–mind just don’t work that way) but as soon as I saw your examples, I immediately got an idea for it!
Thanks. What a fortuitous stumble!
Is there a way to get a particular post to show up on a designated page, but not have it show up on the front page (main blog page).
Dov:
Aral suggested to use the Ultimate Category Excluder. I couldn’t get that to work right with WP 2.3.2 (it displayed my oldest posts first instead of the recent ones). So, I resorted to the trick described here. This is far from optimal since it still counts excluded categories. I did a lot of updating on one of my excluded categories yesterday - and ended up with a blank main page!
Rachel
Hi Rachel,
A quick thanks for your valuable input.
Please feel free to email me directly if you want me to post the code you had issues posting on the blog earlier.
thanks a bunch aral! i’m going to reach for a reason to use this, no idea what I plan to do but i’m really excited to use this!!! eiiiiii! thank you again!
Hi Aral
This is just what I need for an IT support site I’m developing. I’m constructing short topics as posts for people to quickly find a specific piece of information and then combining these topics into structured pages with a TOC using this plugin.
One issue I have is that it would be nice to have one post per page by inserting a page break in between. This is easy enough to do manually and works nicely except that the TOC only lists posts embedded in the current page. If it were possible to generate a TOC for all pages that included the page number it would be really great. Not sure if multiple TOC’s are posible, but I’m thinking along the lines of a repeating pattern of [[ TOC ]] [[nnn]]
Wrapping the inline post in a div would also allow for custom formatting of the post if someone wanted to visually indicate that the post is included or wanted to add some extra formatting to the post title to help distinguish between posts.
I’m thinking along the lines of a repeating pattern of
[[ TOC ]] [[nnn]] [page break]
[[ TOC ]] [[nnn]] [page break] etc…
to give a multipage doc with a TOC at the top of each
Aral:
I’m really enjoying being able to embed posts within posts (and pages within pages) on my business site. I think it really helps with the user’s experience and keeps them from having to click around so much. (yes, the site is still in draft because i got caught a little unprepared when i terminated my relationship with my old internet host). For example, being able to provide pricing for my offerings within the offering descriptions is a great enhancement to also just providing straight pricing pages for those who want immediate access to the bottom line.
One thing I noticed, though, is that if you embed a page that has a page embedded already, Inline Posts doesn’t render through the chain of embeds. The place I just noticed this on is at the bottom of:
http://shadowmoon.com/services/weddings/wedding-package-details/
Note the clear-text reference to page #79 just beneath the “Private Event Coverage” secion. Now, in retrospect, on that particular page, I don’t want the pricing information for private event coverage to muddy up the presentation, so I’ll be changing that anyway. But it does show that embeds of embeds don’t work!
I can see programmatically where that embed chain could get messy to render and why it doesn’t necessarily make good sense to do it. I suppose it would also be just as inelegant to comment out the second embed. What do you suggest for these situations?
I’ve noticed that private posts to your blog can be included using this plugin and seen by anyone, should this raise concerns about the general privacy of posts marked private or is it a rather nifty way of skipping the use of UCE? I mean UCE is currently buggy with wordpress 2.3 (with the ComicPress theme) so this works a dream for me, allowing me to make the posts I need without dirtying my actual rants/entries.
More on the more tag problems… Apparently, WordPress does not honor that tag on pages other than the front page. There are suggested work-arounds, the most promising seems to be here. Although I still can’t get it to work in WP 2.3.3. Does anybody have any suggestions?
For your information. I have come across a problem similar to that reported by Marko on January 19, 2008 .
When I activate your plugin, the titles of all posts on my wordpress site are replaced by a black bar.
I am using Wordpress 2.3.2 on Fedora Core8 running the latest XAMPP package. I use the Prosumer theme.
I tested your plugin with other themes and find the problem reported is theme specific. I have not yet had the time to figure out what part of the prosumer code is causing the problem.
Hey Aral!
You’ve got a nice plugin here, I’ve been using it on my site too. Though I’ve got a little problem. Somehow, when I’m using IE or Opera, the page gives a 404 message when I click on the post’s title, and doesn’t show the full post and the comments. I’m including posts that haven’t been published, only drafted and it works fine in Firefox. Is this the plugin’s fault? Could you suggest anything for the problem?
You can check out my page clicking my name and then clicking webdesign on the navigation menu and see the bug for yourself.
Okay so i figured it out. Without logging in as an admin, you can’t read a drafted post in full, it’s not the matter of browsers lol. I don’t want to publish these posts cause they are supposed to be shown on a desired page only not on the blog, but i would like to allow comments. Any suggestions on that? Thanks
Aral,
First great plug-in. Here’s my problem - I’m trying to set it up for a personal hiking journal on my family web site. When I embedd Gallery 2 link code into my post and then link the post using [[20]] on my journal page, Inline is apparently stripping the Gallery 2 code and I’m stuck with just the link number as text on the page.
for example:
823 is the insert to link a photo gallery in a post.
Inline is returning just the “823″ and stripping all the gallery tag stuff out when it formats my page. Any thoughts?
Thanks.
haha it looks like your Inline code just stripped my Gallery code example from my comment
doh.
let me try again:
(div class=”g2image_float_left”)(wpg2)823(/wpg2)(/div)
After all this time…
I finally found you…
Thanks for the plugin, friend
I’m gonna start using it, but I have to rebuild now
^,^
Wow… I got a tell you once again,
Thank you very much
It runs very well in my WP Version 2.3.3
I really appreciate it
I noticed that inline is adding
tags to every post. This was creating some extra space in my posts, so I changed this line in the file:$content = ''.$content;to this:
$content = '‘.$content;Then I made a display: none entry for the class “hidden” in my css file.
Has anyone else noticed this problem?
Arrghh I don’t know how to make the code show up. But what I did was embed a p tag with a class of hidden and an a tag with a name of top before the content part. Don’t forget to close both tags, or the whole page disappears because of the css mod.
Bummer- I actually just had to deactivate it, because it conflicted with the kPicasa plugin.
Jeremy, I’m having the same problem. Happens on all my static pages too, any ideas yet? I originally tried the same thing you did, noticing that it was adding extras. No luck.
Is there a modification or config within this plugin so that the comments and the comments input form can be included with the inline post? We’re trying to create a podcasting site, and want to encourage all visitors to post comments. Generally, people are more likely to post comments when the comments and the comments form is presented. And so, we’d like to have that right on our homepage.
This plugin is exactly what I need and have been looking for.
I know this might be a stupid question but is the Page ID something like example.com/?=4, the defualt setting?
If so, I have Pretty Permalinks and I have no idea what the hell my page ID’s are.
I tried entering [[example.com/sub-example]] but it just comes up as text on the page.
Anyone got any ideas what I’m doing wrong?
Thank you in advance
Using Wordpress 2.5. What the hell is a post id?
Well, whaddya know! It’s at the end of index.php/blah, blah, blah, p=x. Where x= the post ID.
Look at the url that comes up when you edit posts from the manage posts screen. It’s the number at the end.
I must be really weird. In my limited little mind, finding the post ID seems like an important point. Nowhere is the term “post ID” visible.
Cool plug though!
Hi Aral
I downloaded your plugin onto my site and activated it, saved the options, etc. But no matter what I seem to do it doesn’t show. I note that there is conflict in what you say to do, on one page you say to start the post with [[nnn]] nnn being numbers, on another that I looked you say use [[nnnn]] I did try both. Should you also end the post with [[nnn/n]]? or use it just at the beginning?
Should the code look like this : -
[[nnn]]Project blah blah blah
Would be grateful for your assistance. It could be that the Tarski theme which I run on 2.3 might not accept?
Great plugin. I am curious how to elude duplicate content penalties using this plugin. Perhaps its setting up the categories differently but currently, if I inline a page to a page, the original page will display under the “Parent Category” as well as its own page creating duplicate content. Any advice?
So this plugin displays pages within pages/posts
It does not display posts in a page.
If it can, please let me know, thanks! ;]
Hi Aral,
I just noticed that inline posts isn’t interacting well with Galleries in Wordpress 2.5. I think it is picking up the [gallery] tag and getting the images from all posts/pages on the current page. Don’t quote me on that!
@Belinda: by nnn, I mean the numeric post ID (e.g., 123, 54, 1230, etc.)
@Charley: I haven’t tested it with the Galleries plugin (I don’t use it). Ideas for how to work around the issue?
Interesting plugin, thanks for sharing. I’m in sort of a predicament now with my theme and I was wondering if anyone knew the solution to this, maybe there is a plugin out there that I don’t know about.
I want to display on a sidebar, categories only for pages, and recent posts only on post pages. Is that possible?
Thanks,
Roy
Aral, you need to close a tag on your WordPress page (you’ll see when you get here).
@Roy
Umm… if you’re aksing what I think you are it’s insanely simple. Go to WordPress.org and start studying theme template files.
nice work…similar to wiki