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

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.

Related

Is it possible to create custom entities (entries if you take up the strapi vocabulary) in wordpress?

Edit : the thing I was looking for is called Custom Post Type in the WordPress World
Disclaimer: it is my first steps with WordPress and I realize I do not have the right vocabulary to make a proper google search, so please excuse me if this answer has been already asked many times ...
I'm working on a website that use an old preexisting WordPress as headless CMS.
On this new website, I need to display some "job offers"
On the preexisting WordPress, those job offers are just HTML blocks embedded in a page. So I can't get only those without having the embedded page HTML and CSS
If I could have created a custom REST API to get those "job offers", I would have said that those resources would look like this :
{
title : string,
description: string
}
My first idea would be to create a WordPress custom end point, but I do not know if it is possible to create custom entities (entries (?) If I take up the vocabulary of strapi)
Is this something that can be done?
I've tried :
basic google search
reading the strapi and wordpress documentation
I expect to be referred to a solution or to know what to search
The thing you're looking for are Custom post types if that can help a plugin called ACF can help with the custom fields.

How to create a listing of Social networks' posts with Drupal

I want to achieve something like this: http://curatorsofsweden.com with DRUPAL
Here different people post over the same twitter-Account for one week. The Twitter-stream is published on the Website and you can also „time travel“ via the archive to see what which people posted in which week/days.
I want to achieve the same with DRUPAL and with a Twitter AND Instagram Account (and maybe FB too). My Idea is to import those streams with the feeds-module to treat the posts as DRUPAL-content. This way is more flexible to work with the content afterwards. But how to "automatically" map this to different users (or maybe treat a user as own content-type instead of normal DRUPAL-user?)?
What modules - or combination of modules - would you use to realize this? Im open for any suggestion!
Thanks
St.
Edit the view/config page of the feed to include a "user reference" using terms or taxonomy. This might require using a custom hook_form_alter to tweak it a bit.

How to create a page like the WordPress Plugin page

I'm pretty sure this is basic but it's been a couple of weeks I'm struggling.
I'm building a video game news type of website with Wordpress and I would like the "game sheet" to work in the same way the WordPress plugin page works (here is an example: http://wordpress.org/plugins/buddypress/ )
The idea would be to have a page for each game and then this page would pull out content in each tabs to display different content:
News would be articles with the game name as a tag
Screeshots would be images from the media manager I would have tagged with the name of the game
Game review and user voting in the sidebar
etc...
Again, this seem to be a very basic taxonomy/custom post type system but I just don't know where to start and I can't find the right words to explain it to do a proper google search.
Thank you for your help.
What you need is to create a "custom post type". In other words, something like a post, but with more / different fields. I suggest you use the plugin: "custom content type manager".
After you create the custom post type you need, you will only have to create a page / post the summarizes the custom content you have built. For that you will also use the same plugin.

Wordpress, alternative single post template

For a project of mine I need to define an alternative template for single posts.
To be more specific I need each post to be displayed as usual when the website is browsed but I need to create different single pages reachable from different URL to create a sort of a mini-website for each post.
(I'm actually using the WooCommerce plugin and what I need to do is to create a mini-website for each product. This needs to be something "outside" from the main website, with a complete different graphic template and is going to be reachable through a QR-code).
Hope it makes a bit of sense.
Thanks for your advices and/or suggestions.
Angelo
I think the easiest way to do that is by registering a custom post type for the special posts that get this special "single.php" template. Then, you can simply write a new single template titled post-[custom post_type].php. Any post you register of this type will use that template.
OR...
If you don't actually need them to be posts, it's even easier if you publish them as pages. By default, pages let you assign a specific page template in the edit screen. So you could make any number of custom templates. Just make sure you add the special header:
/* Template Name: Custom Page */
...so WP knows it's a page template.

wp email publishing with custom content type?

having researched wp forums and only found people asking this question without any answers, I resort to the source of all truth (stack overflow).
I use wordpress custom post types (Custom Post Type UI plugin) and find it very handy.
Now, I want to be able to email-publish some content via WPs built-in email publishing system, but by default that is set up to only publish as regular posts.
I am aware that I can choose categories for the emailed content, but I would very much like to keep all the pages and content of my news (=blogposts) feeds the way they are, being able to put the email-published content into a content type of its own would really help me out.
So I wonder if anyone has done that, and how you would go about it. Thanks for any input.
Not sure if this helps people looking for a solution, but I managed to do it like this...
When a post is submitted for publish by WordPress default email2post, there is an action hook named 'publish_phone' running, so you can get the post there and change its type like this:
add_action('publish_phone','custom_type_by_mail');
function custom_type_by_mail($post_id){
$p = get_post($post_id,'ARRAY_A');
$p['post_type'] = "my-custom-type";
wp_update_post($p);
}
I resorted to converting it into a post category instead of its own content type. I know not whether there be any other solution =)

Resources