Using post formats with your custom wordpress post types — what about wordpress

When I try khổng lồ get the format of a post in the loop I get an empty return from get_post_format() if the format is "aside".

Bạn đang xem: Using post formats with your custom wordpress post types — what about wordpress

The response is also empty if I try lớn get the post object with get_post().

Everything works if the format is phối to lớn default or gallery. The post formats are correctly registered & you can select all three formats in the backend interface, when you create a post.

Has anybody an idea, what the problem could be?

Would be great, if somebody could help me with this.


php wordpress post format
Share
Improve this question
Follow
edited May 21 "17 at 14:trăng tròn
*

HDJEMAI
7,6023939 gold badges5959 silver badges8080 bronze badges
asked May 18 "17 at 9:53
*

RoccoRocco
2144 bronze badges
Add a bình luận |

2 Answers 2


Active Oldest Votes
1
Chechồng your functions.php for the supported post formats.

Xem thêm: Hướng Dẫn Cách Chuyển File Excel Sang File Pdf, Chuyển Excel Sang Pdf

You can add the "aside" to it and everything will work fine.

Hope this help. SYA


Share
Improve sầu this answer
Follow
answered May 18 "17 at 10:16
*

LebCitLebCit
54633 silver badges1212 bronze badges
1
Add a comment |
1
Issue is resolved. A content-aside.php existed in the theme, that I did overlook. Thanks anyway for the help.


Share
Improve this answer
Follow
answered May 18 "17 at 10:35
*

RoccoRocco
2144 bronze badges
0
Add a phản hồi |

Your Answer


Thanks for contributing an answer to lớn Staông xã Overflow!

Please be sure khổng lồ answer the question. Provide details and giới thiệu your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; baông xã them up with references or personal experience.

To learn more, see our tips on writing great answers.

Xem thêm: Review Sách “ Mật Mã Từ Cổ Điển Đến Lượng Tử, Khoa Học Khám Phá


Draft saved
Draft discarded

Sign up or log in


Sign up using Google
Sign up using Facebook
Sign up using E-Mail & Password
Submit

Post as a guest


Name
E-Mail Required, but never shown


Post as a guest


Name
Thư điện tử

Required, but never shown


Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy và cookie policy


Not the answer you're looking for? Browse other questions tagged php wordpress post format or ask your own question.


The Overflow Blog
Featured on Meta
Visit chat
Related
949
What's the difference between a POST and a PUT HTTP REQUEST?
1623
JavaScript post request like a size submit
5651
PUT vs. POST in REST
1264
How to lớn make an HTTP POST website request
1763
How can I print literal curly-brace characters in a string and also use .format on it?
823
How lớn access POST form fields
1006
How is an HTTP. POST request made in node.js?
1559
How are parameters sent in an HTTPhường POST request?
332
Receive sầu JSON POST with PHP.
0
Defining page layout for defualt post formats (aside)
Hot Network Questions more hot questions

Question feed
Subscribe to RSS
Question feed To subscribe lớn this RSS feed, copy và paste this URL into lớn your RSS reader.


*

lang-php
Staông xã Overflow
Products
Company
Staông xã Exchange Network
site design / biểu tượng logo © 2021 Stachồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.4.6.38996


Stachồng Overflow works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Staông xã Exchange can store cookies on your device & discchiến bại information in accordance with our Cookie Policy.


Chuyên mục: Theme wordpress