Get Post
Get Post adds a tag that allows you to retrieve and display the latest post identified by a specific set of parameters. When this plugin is active, any post or page can contain the get-post markup as follows: [get-post tag=some-tag] This will be replaced with the latest post tagged with the given tag. Parameters The parameters control which posts are retrieved by get-post. Options can be used in combination to build a list of criteria for post or posts to retrieve. By mixing criteria, you can exert a lot of control over the post(s) which are found by the plugin. [get-post tag=some-tag random show=3] One note on WordPress in general: if you specify criteria that WordPress can’t match, it will make something up. For instance, if you specify a tag or category that doesn’t exist, it will simply retrieve the latest post with no indication that anything is wrong. Take care to ensure that the options you specify are what you intend. Several of these parameters work best when specifying the slugs. For instance, when specifying a tag it’s best to use the slug value rather than the full name of the tag. To find the slug, see the admin panel -> posts -> post tags. The slug is listed right on that page. You may wish to specify an option value with a space in it. This is accomplished with quotes: [get-post option="a value with spaces"] tag: Specify a tag to search for. The tag’s slug should be specified. [get-post tag=some-tag] category: Specify a category to search for. The category’s slug should be specified. [get-post category=some-category] show: Specify the number of posts to show. [get-post show=5] template: Specify the template to use. This specification overrides the template set in the options panel of the admin interface. See the template section for more details on template tags. NOTE: If entering any HTML into this, please be sure to select the HTML editor rather than the visual editor. [get-post template=" Title: {title} "] random: Select a random post from the matching criteria [get-post random] default: This isn’t really an option. By default, get-post displays the latest blog post. [get-post] Templates Get-post ships with a default template that should render the usual post details in a form that fits well with most themes. You can customize this template to add or remove data from the included post. Additionally, you can use the template parameter to the [get-post] tag to specify a one-off template. Using the show parameter will retrieve multiple posts. In this case, the template will be repeated one time for each retrieved post. These tags are replaced with the value from the retrieved post. For instance, a template containing {title} will actually have the title of the retrieved post, rather than the word title. {title}: The title of the post. {content}: The content of the post. {author}: The author of the post. {date}: The date the post was written. {time}: The time the post was written. {permalink}: A link to the post itself. {authorlink}: A link to all posts by the post’s author. {id}: The post’s ID number. Examples Indicate when your blog was last updated: Blog last updated [get-post template="{date} at {time}."] Link to the latest post: Check out my post: [get-post template=" {title} "] How it works This plugin does something a little bit unorthodox: It reenters “The Loop” while the post content is being rendered. Then, it calls whatever WordPress internal functions will safely work, using raw data from $post when these functions are unsafe to call again. People curious about the internals should examine class-get-post-getter.php. The class is structured to be reusable by any other GPL2 projects.
Top keywords
- post27×4.31%
- get-post16×2.55%
- template14×2.23%
- tag12×1.91%
- specify9×1.44%
- title8×1.28%
- posts6×0.96%
- category5×0.80%
- latest5×0.80%
- show5×0.80%
- slug5×0.80%
- criteria4×0.64%
Translate WordPress with GTranslate
Translate WordPress with GTranslate plugin uses Google Translate AI translation service to translate wordpress site with Google power and make it multilingual. With 103 available languages your site will be available to more than 99% of internet users. Our paid versions are fully SEO compatible which will increase your international traffic and sales. This translate plugin is a budget multilingual WordPress solution which combines automatic and human translations to save money and is easy to implement. GTranslate is a leading website translation services provider since 2008, it moves away the language barriers. Compared to other translation plugins for WordPress, we use cloud based approach which does not slow down your website. In addition to that, we can offer complete SEO features based on sub-domains with our paid options, which can make your website appear in search engines in different languages which will increase your international traffic and sales. In our paid versions we DO NOT limit the number of words or the number of translated pageviews. You DO NOT pay additionally for automatic translations. Please use GTranslate Support for your questions and support requests! We are multilingual! Please check our FAQ to get quick answers. Features Free Google automatic machine translation Hides Google top frame after translation Translate website on the fly Translate posts and pages Translate categories and tags Menus and widgets translation Themes and plugins translation Right to left language support Google language translator widget Auto-switch language based on browser defined language Available styles Float, Dropdown, Flags, Flags with dropdown, Nice dropdown with flags, Flags with language names, Flags with language codes, Language names, Language codes, Globe, Popup Floating language selector WooCommerce shop translation Multilingual language names in native alphabet Alternative flags for Quebec, Canada, USA, Brazil, Mexico, Argentina, Colombia Lazy loading for language flags and js libraries to boost performance Lightweight vanilla javascript without dependencies Forum Support Paid Features Multilingual SEO – Enable search engine indexing Neural machine translations with human level translation quality Increase traffic and AdSense revenue Search engine friendly (SEF) URLs Yoast SEO compatible – translate meta keywords, meta description, schema.org data structures, translate sitemaps WooCommerce compatible – translate products, schema.org data structures You can have sub-directory (example.com/es/) or sub-domain (es.example.com) URL structure URL Translation aka slug translation is possible (example.com/about-us → example.es/sobre-nosotros) Add hreflang tags for translated alternatives You can manually correct translations In context translation interface (make corrections without losing the context) Meta data translation (meta keywords, meta description) Translating schema.org microdata for better search engine appearance Seamless updates (cloud service updated on our side – SaaS, you do not need to worry about backups on your side) JSON format translation Translate WooCommerce emails AMP translation (Accelerated Mobile Pages translation) Image localization – Media translation Translation Proxy (aka Translation Delivery Network) Centralized Translation Cache – We revise and improve translations over time Language Hosting (example.fr) User Dashboard with Analytics Live Chat Support See also If you are looking for unlimited, high-quality automatic translations, check out TranslateX – an automatic translation API offering unlimited translation for your website or application. We also offer integration plugins: TranslateX for Loco Translate – integrate TranslateX API directly into Loco Translate for seamless, unlimited automatic translations. TranslateX for TranslatePress – bring unlimited automatic translation to TranslatePress using TranslateX API. These solutions make it easy to supercharge your WordPress multilingual setup with TranslateX’s secure and affordable API. GTranslate WordPress Demo Watch GTranslate Tour Edit Translations Demo (paid)