Is it possible to create custom entities (entries if you take up the strapi vocabulary) in wordpress? - 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.

Related

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.

Google Maps in Wordpress

In Wordpress I have created a custom field 'LatLonPosition' which contains different positions in the following format '48.96N, 10.23W'.
I was wondering if it's possible to pull the custom field content so that it displays a google map on each posts of the coordinates.
I know you can download google map plugins, but I was hoping to do this with the custom field if possible.
Hope someone can help.
Thank heaps
Though i have started working on word-press and php but its quite possible what you are trying to achieve
You can use either
get_post_custom_values()
if you are not concerned with the uniqueness else word-press also provides get_post_meta()
here are the details
Accessing post custom fields

Live Sorting by Custom Field in Wordpress

Im working on a wordpress powered website for a client that involves a directory of local offices. Part of their requirement is that live sorting be implemented via drop downs, so when someone selects X Office in X Area, the page dynamically loads the relevant results.
I currently have a custom post type set-up called "listing", which lists all the relevant information for that office. I then display each of those fields via the Loop.
In a perfect world, a plugin would exist that would perform the above, but I've yet to find one. The closest I've come is The custom category sorting over at Digging into Wordpress.
Any suggestions on a "easy" solution that would allow me to sort "listings" with multiple attributes?
please use the wp-smart-sort plugin for that.
With the help of this plugin you can also sort the custom field
If there is any issue after the use of this plugin then let me know
thanks

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