Using Ghost's post loop on other pages - ghost-blog

I use Ghost and on the index page I have the post loop spitting out post excerpts.
Now I would like to make another page that lists only the titles of the posts.
However I do not have the post loop available on other pages.
How can i do this?

This is currently (Ghost v0.5.3) not possible to do. It will however be something you can expect to do with the query helper once it's shipped (see the Ghost Roadmap for reference).
Some themes have implemented what you are asking for by using client-side JavaScript and fetching post titles from the RSS feed (which can be paginated). The RSS feed lives at /rss and can be paginated by adding the page number to the URL: /rss/2, /rss/3 etc.

hi this is not exact the same thing you looking for https://github.com/danecando/jquery.ghostrelated but you can check the source how you can paginate between the rss 1/2... and grab the posts

Related

How to pass two sets of posts to wordpress template

Our website currently has functionality that allows us to choose content for a newsletter and it generates two RSS feeds based on the selected data - one for articles chosen to appear in the newsletter and another for products that were chosen to appear in the newsletter. We then use those two RSS feeds to assemble our newsletter in the tools at our email service provider.
Now we're moving to a new email service provider that doesn't offer this RSS functionality, so we need to change the way wordpress renders it so that there is one template that combines both the products and article data into one formatted newsletter. And being a wordpress newbie, I'm having trouble understanding how I can pass two sets of posts to the template for rendering.
The way it currently works with the RSS feeds, is there is a switch in the query to pull the content to change the query depending on whether the feed being viewed is the products feed or the articles feed. This querying is altered via the "pre_get_posts" filter.
Please let me know if you have any suggestions of how these two sets of data can be combined into one template. Thank you for your help.
Unless anyone has a better solution, I think the way I'm going to approach this is to modify my "pre_get_posts" action to do two queries - first for articles and next for products - and then create a new query using post__in and orderby=>'post__in' which should preserve the order in which they were added to the query.
This way, I'll know to treat the first X posts as articles and the remainder as products.
This article was helpful in finding the solution of orderby=>'post__in' : http://www.tamaraolsondesigns.com/tips-and-tricks/how/

Wordpress posts with Spotify <iframe> in excerpt/description

I need to display the spotify preview along with the post thumbnail on the archive page.
It doesn't necessarily have to embedded on the Excerpt, but I'm wondering how is it possible to create a iframe per post which is easy to mantain (using a simple posting system)
2 things I can think about - 1st you can actually create your iFrame inside the archive.php and the excerpt field to be just the url, so inside the file you can have something like:
//the loop
...//some content
<iframe src="<?=get_the_excerpt()?>"></iframe>
...//more content
//end loop
2nd thing I can think about is too use some pluging to add extra fields to your posts which you can call. I personally like CMB2 they have a really good documentation and all sorts of custom fields you can add to your posts.

List posts with embedded videos

is there a way to list posts which have embedded videos in the content. Newly added posts needs to be automatically added to the list also.
I am using Wordpress.
Thanks
The best approach would be to create a category for the posts with the video and then query that category. Can you do that?
For this I feel that
You need to create one time function which will execute on some hook and will search through your content for the links related to videos(video site url's).
If any post having that link it will assign category to that post.

Drupal RSS feed links

I'm creating some feeds of news items and such. These items have URL aliases set for them. Is there a reason why the URL alias do not get used in the RSS feed?
I have a multi-language site which uses the path aliases to show correct navigation, and so when I get a 'node' link from the feed, it breaks everything.
EDIT
I'm creating the rss feed as using views
When I do a live preview in the view the correct link is shown. So the incorrect link comes somewhere after that.
Are you creating the feeds using Views? if not you should do it. It may be happening that the code that's returning the feed is printing the links to the nodes without using the l() function so aren't being translated to the corresponding alias.
Just in case, here it's a nice tutorial about how to do a feed with Views http://drupal.org/node/314097

WordPress- have a specific type of "page/post" as "testimony". Possible? If so, how?

I'm implementing our school's website using WordPress as CMS. So far, it works well and I'm 80% done. Our website is basically 11 WordPress pages and a blog.
Now, there is one feature i'm not sure how to resolve. We want to have "testimonies" of past students to be displayed across WordPress pages, in a specific area of the page. They will either be videos or written text with an image.
They will be embedded on regular WordPress pages either a specific video for a specific page, or just random testimony video for a given page.
Is it possible to do that with WordPress? If so, how?
Thanks for any hints.
Alex
There are quite a few Wordpress plugins which handle testimonials gracefully:
http://wordpress.org/extend/plugins/search.php?q=testimony
You should be able to do this with categories. Create a testimony category and and then create a new template called 'testimony-page.php'. In that template, put a separate loop that pulls a random testimony from the database. Voila, page in a page.
If you feel like building this yourself, it can be handled with custom post types. Here is a great guide that will give you a lot of useful information: http://www.smashingmagazine.com/2012/11/complete-guide-custom-post-types/
I like to use this plugin:
http://wordpress.org/extend/plugins/more-types/
To manage my custom post types.
To query posts from a new post type, use something like:
query_posts({
'post_type' => 'testimonials'
});
So, if you wanted to add testimonials to your site, you'd query them like above with whatever parameters you need, and do a simple loop to output the posts.

Resources