Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [post-formats]

Post Formats allow for various types of posts to be styled or formatted based on their meaning.

0
votes
0answers
16 views

How to query the “standard” post format with the REST API?

I'm trying to write a search filter where it filters by author, category, and post format. I have successfully been able to filter by audio and video but am at a loss for the standard post format. ...
0
votes
0answers
7 views

Including Post Format in filters for “All Posts” [duplicate]

How can I add a filter for post format on top of the "All Posts" page in the backend?
0
votes
1answer
26 views

Display archives based in post_format

I'm working in a project that needs to use post_formats. First of all, is there any way of create a new post format? The only thing I've found was to overwrite an existing one. In addition, they're ...
1
vote
0answers
26 views

trigger html cleanup for all posts

So i know that wordpress will auto clean / format html within posts / pages automatically when switching back and forth from text to visual: https://stackoverflow.com/questions/9907757/wordpress-...
0
votes
2answers
19 views

Is it possible to customize the post according to post format in single.php?

First let me know you that I have made a blog before and I have customize it according to the post format but I have customize it on the blog main page i.e. index.php. Now I am making a another blog ...
0
votes
2answers
24 views

show a post from a specific post format

I want to show 4 posts from a WordPress post type where 1 will show the post from the link format and the other 3 will be shown from another format. So in this case, how to use the query or what ...
1
vote
1answer
24 views

Query different number of posts with different formats in one go

I want to output 7 latest status posts and 5 latest aside posts in one go (they should be sorted in one list from latest to earliest). But I don't understand how to write such a WP_Tax_Query. I've ...
1
vote
0answers
34 views

How to add Post Format Taxonomy Archive page in the menu?

I have customized the archive template for the post format using the Wordpress template file structure. I have the file: taxonomy-post_format.php which works fine. The page is then accessible ...
1
vote
1answer
30 views

Remove certain post-formats from showing in blog?

I'm coding this wordpress theme and I enabled post-formats, currently designing them. What I want to do is use quote post-format to display reviews and I don't want it to show in blog posts. Is that ...
0
votes
1answer
30 views

Permalinks Question: Adding a prefix ONLY in front of all posts with the 'video' post format

This article is where I grabbed the initial code from, but I am wanting to target all posts that have the video post_format. I am able to change my $post_link to what I want it to be, but when I alter ...
1
vote
0answers
14 views

How to use format post in a pertinent way

I need to create a video post for my theme. I want to use post format via: add_theme_support( 'post-formats', array( 'video' ) ); So it is good, in my single.php I will able to get: if ( ...
0
votes
1answer
15 views

Can I assign a Folder for Post Formats, without it affecting WordPress' fallback/hierarchical system?

I have created a few Post Format Templates Files. format-aside and format-audio etc. At present, I am using <?php get_template_part (‘format’,get_post_format()) ;?> to call such Templates. In ...
0
votes
1answer
28 views

Will renaming a `content.php` file cause any problems?

I am currently creating a few templates for the various Blog formats, such as; 'Aside', 'Quote' and 'Gallery'. I see a lot of people create such Templates by naming such files as: content-aside....
0
votes
1answer
150 views

Return only one post format in index.php [duplicate]

I'm trying to customize index.php of my theme in order to return/display only one post format (images in this case), and hide all the rest(aside, video, link...). I tried to implement this code in my ...
0
votes
1answer
41 views

How to display list of video post on video section?

I already success to display combination post between articles & video using the code below: <?php if( have_posts() ) : ?> <?php while( have_posts() ): the_post(); ?> ...
0
votes
1answer
763 views

get_template_part() Not Working in Loop

I am having trouble getting get_template_part() to work on my index.php page. The template part is in the loop and is referencing a 'standard' post format. template code: <section id="content" ...
0
votes
2answers
137 views

Paste from word not preserving formatting

When I paste from word, it adding a lot of extra spacing around each block of text. If I look in html editor, it's putting a <strong> </strong> in between each block of text, which makes ...
1
vote
0answers
112 views

Hide Gallery from the_conent

I'm using a function to separate Featured Content. What I mean is that: if I selected format Gallery will show the First Gallery in my post , if I choose format Video , will show a video instead . ...
0
votes
2answers
33 views

My custom theme text and content format

Hi I am new to Wordpress development and I have learned a lot already but I do not understand why the text and content in the pages and posts does not keep the format that the user sets in the back-...
0
votes
1answer
352 views

How to add meta box for current post format?

I wanted to add meta box with current post format like when i select video post format then there will be appear video url input post just under the post editor. How to do that? any help
1
vote
0answers
61 views

Next Posts Prev Posts for Standard post format only

I am using the following functions in my single.php file to display links to Previous and Next posts: get_next_post(); get_previous_post(); I store them in 2 variables: $next_post = get_next_post();...
0
votes
0answers
271 views

How to get all posts in gallery post format template

I'm doing a WordPress theme, and I get stuck on one thing. As you know, the post-format in WordPress has different types of formats, I did all the types except the gallery. I get the category page ...
1
vote
1answer
24 views

Set Post Format if find a string in title or post content

I'm working with ITFFF in order to create posts, but I have a problem with the "Post Format". I need to change the Post Format to image if there are some specifics strings in the title or post content....
1
vote
0answers
39 views

What's the best practice way of handling custom fields in different post formats?

I am developing a theme that is compatible multiple post formats (video, audio, gallery, status, quote, etc.) From the perspective of a theme developer, what is the best practice way of handling ...
4
votes
2answers
4k views

Are content.php and content-single.php the same?

I understand that when using get_template_part('content', get_post_format()); it will help choosing a post format for specific page according to post format. And if there is no post format 'i.e it's ...
5
votes
0answers
235 views

static variable loop not working in Wordpress

I have a function in my wordpress theme that deletes the first embedded video in a video post. See code below. This is in the functions.php file. /* - function that hides first video in post content -...
2
votes
2answers
416 views

Removing the post format (type) slug

Got stuck trying to remove the post format slug, so i could have i.e. example.com/video for the video section instead of example.com/type/video. Usually it's done like this: add_action( 'init', '...
0
votes
2answers
483 views

Override post-formats in child theme

I'm using a child theme that only has video post format, but parent theme defines all post formats: add_theme_support( 'post-formats', array( 'gallery', 'link', 'image', 'quote', 'video', 'audio', '...
1
vote
1answer
86 views

Different markup for each post format

I use the underscores.me framework and in my content.php (the template displaying the loop of posts) I have the following code: <div class="article-text dot-ellipsis"> <div class="...
1
vote
1answer
779 views

How to get post attachments in gallery post format template

I'm doing a WordPress theme, and I get stuck on one thing. As you know, the post-format in WordPress has different types of formats, I did all the types except the gallery slideshow. What I need, for ...
0
votes
2answers
221 views

Get post format and use it as a CSS class in different spans

I use a <span> inside the loop and I would like to get each post format the post is containing as a class in separate spans. Example: If the post format is video and private: I would like to ...
0
votes
2answers
235 views

Display post formats differently on index.php (loop in function)

I'm new to WordPress and I'm hoping to display post formats differently on the home page; sort of like this image: The problem is that the theme I'm using is very different than other themes I've ...
1
vote
1answer
38 views

Is there any problem if I use get_template_part like this?

I want to display different content on my home page and in single pages, so I am using the following code in index.php: get_template_part( 'template-parts/content-home', get_post_format() ); At ...
1
vote
1answer
177 views

How to load a different header based on post format?

I have a difficult question. What's the best way to load a different header based on a post format? I guess I could load another loop around the header but I noticed the site does slow down. This is ...
0
votes
1answer
56 views

Setting 'post_format'

Currently I have the following code for my automated posting process file. // Create post object $my_post = array( 'post_title' => wp_strip_all_tags( trim( $row['title'] ) ), ...
0
votes
2answers
43 views

Post format or Type for List Type Posts

I want to create a post type / format where I can create list type posts... For example... h1.Title: The List Post Title like "Best Salads..." - Intro paragraph h2. Best Veg Salads - Intro -- h3. ...
1
vote
0answers
447 views

How can I remove the first video from a post and feature it?

I am trying to develop a theme in which when you select a 'video' post format, it automatically gets the first video from the post and features it (instead of where the featured image would normally ...
0
votes
1answer
715 views

Audio post format with Advanced Custom Fields

I am using the Advanced Custom Fields plugin to create custom fields for post formats. I have a field that only displays when the audio post format is selected. This is a text filed where the user ...
0
votes
2answers
545 views

Icon over thumbnail according to post format

How would I go about adding icons over post thumbnails according to their post format. So for example if I have a post with a post format of audio the thumbnail would show everywhere(widgets, category ...
2
votes
1answer
603 views

How to generate a featured image from a video embeded in a metabox

I have a metabox that allows me to add videos from Youtube and Vimeo on posts with video post format. I am now looking into automatically generate thumbnails for these post with video post format. ...
0
votes
1answer
297 views

Update caption for metabox gallery images

Just wondering how to make the caption on my metabox gallery images updatable. I have the caption on a textarea so it can be easily updated. I can change the contents of this textarea, cant seem to be ...
0
votes
1answer
413 views

How to show post format gallery metabox image caption in the post front end

After getting my images through a metabox for a gallery post format I have the following code to show them on the post front end: <?php if ( !empty( $images ) ) { foreach ( $images as ...
0
votes
1answer
934 views

Get image captions for images on gallery post format metabox

I have a post format gallery. I have created a metabox to add my images: function mytheme_show_post_gallery_metabox( $post ) { wp_nonce_field( 'mytheme_post_gallery_metabox', '...
0
votes
1answer
300 views

Archive of post format for Custom Post Type

Im using the CPT UI plugin to create my custom post types. I was wondering what i needed to do in order to see an archive of my custom post type by post format ie.. usually for default posts the url ...
0
votes
1answer
246 views

set_post_format called after wp_update_post when using bulk edit?

EDIT: See comments below. changing the question to reflect this new info From what I understand from the codex, save_post is meant to always fire after the post is saved (and when creating a new post)...
0
votes
1answer
777 views

Month display in English but required in Swedish?

I am using WordPress settings like below Image: On post output come like 13 October 11:49 but my requirement is to make it like oktober in Swedish and same for all other months. Thanks!
1
vote
2answers
482 views

Filter the first <blockquote> from Quote Post Format

I want to get the first blockquote from the post (even if the user writes only one, or more than one) in the Quote Post Format, in order to show it in the archive Loop. For example: $quote = ...
0
votes
2answers
63 views

About post format

I've been trying to get post format to work for a while now, and for some reasons it is still not working the way it should. I am creating a custom theme based on HTML5 Blank theme. First thing I ...
1
vote
0answers
55 views

Post Format Default Content

Is it possible to have the default content change as the user selects different post formats? What I want is for backend users of my Wordpress to select different formats, thereby changing between ...
1
vote
0answers
68 views

How to get Related Custom Posts?

So i am having an issue where i try to get the latest posts but also the related one from Custom Post Format - Video. Didnt see anywhere this solution/tut, is it even possible, i guess it is. I just ...