Archive for January, 2013

RelayPipe Tip: Changing The Number Of Posts That Appear On Your Page

Wednesday, January 9th, 2013

For those of you using RelayPipe, there is an ability to regulate how many posts appear on your blog page. The standard display is ten posts, however you may want to shorten this number to accommodate a shorter page template, or to make reading appear easier for your visitors.

Shortening the number of posts that appear on your main blog feed will not reduce the number of articles that you receive; it only reduces the number that are displayed. Additional posts will still be available in your Archive and Category lists, as well as in your 'more posts' link at the bottom of the blog page.

The process is made fairly easy with the following instructions:

1. Open your RelayPipe blog page file (the one where you are storing your RelayPipe Access Code, and that governs your display of posts);

2. Proceed with the following edits. Note that we are working in the area of your file from about line 30 to about 33, as shown in this next image:


3. Assuming you want to change the number of posts to '4', change the zero in line 30 to '4' as shown in the image below:


4. Next, replace the lines that start with 'else' and ends with '$_REQUESTS);' as shown in the image below...


5. ...with the following new lines as depicted in the image below (see files downloads below for written copies):


*NOTE that it is important to make sure the REQUEST and LIMIT variables are the same, and that while I have used '4' as my example, you can make this any number you would like to fit your page. I have circled these in the image below:


The image above shows how this should look in its final edited state in order to limit the page to four posts.

If you want the code for this section in a handy copy-and-paste format, download the 'quick-fix-file'.

If you want the entire edited page of Basic code from our pre-written RelayPipe examples, download the 'edited-basic-file'. Note that this will give you the code for limiting to 4 posts. You can change the number if you like. Also note that you will have to install your RelayPipe Access Code at the top of the file in order for it to work with your account.

Write us in the Support Ticket System in your ListPipe account if you have additional questions.