Closed GoogleCodeExporter closed 8 years ago
Are you sure content-mebeli.php is the theme file that's supposed to load? The
way WP handled templates is crazy and very difficult to troubleshoot. Are you
sure it's not supposed to be category-mebeli.php?
See http://codex.wordpress.org/Template_Hierarchy
Original comment by ever...@fireproofsocks.com
on 18 Feb 2013 at 8:50
Hi,
And thanks for fast replay.
I'm not experienced developer and I'm not sure.
I know about Template_Hierarchy,
I wanted to use get_post_format() because I liked the code in index.php for
Twenty Eleven:
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() ); ?>
endwhile;
This way they load content-page.php for page post type, content-gallery.php for
gallery post types and so on.
In my case when post type is "mebli" it loads content.php.
I made an experiment and wrote
/* Start the Loop */
while ( have_posts() ) : the_post();
$postType = get_post_format();
echo $postType;
exit;
endwhile;
and nothing was shown on the screen. Which means that get_post_format() doesn't
detect custom post type. This is my not professional opinion.
I can't solve this issue alone, so I'm asking you for support, because I like
this plugin and use it almost in every project. :)
Regards
Original comment by bogastyl...@gmail.com
on 19 Feb 2013 at 8:54
You need to check the option to support post formats:
http://www.screencast.com/t/kfOZypumU
Original comment by ever...@fireproofsocks.com
on 19 Feb 2013 at 6:15
Hi and tanks for replay.
I checked this option, but it doesn't work again.
Take a look at this screencast http://screencast.com/t/VvKg1IskeS what I have
and what I'm doing.
Mean while in this situation if I click on "Mebeli 1" it ;oads
single-mebeli.php which is fine.
But still can understand why never load content-mebeli.php.
This tests are made over new clean Wordpress instalation:
*SYSTEM INFO*
------------------------
Plugin Version: 0.9.7-pl
WordPress Version: 3.5.1
PHP Version: 5.3.8
MySQL Version: 5.5.16
Server OS: WINNT
------------------------
ACTIVE PLUGINS:
------------------------
CURRENT THEME: Twenty Eleven v.1.5
http://wordpress.org/extend/themes/twentyeleven
Original comment by bogastyl...@gmail.com
on 20 Feb 2013 at 8:27
get_post_format always returns what I expect.
I can't reproduce this :(
Original comment by ever...@fireproofsocks.com
on 2 May 2013 at 5:48
Just close this issue and don't worry anymore. ;)
Probably my case is some kind of exception or it is my bad luck.
Original comment by bogastyl...@gmail.com
on 3 May 2013 at 9:20
Sorry I couldn't duplicate it... there might be something weird going on here,
I just couldn't find anything :(
Original comment by ever...@fireproofsocks.com
on 3 May 2013 at 2:48
Original issue reported on code.google.com by
bogastyl...@gmail.com
on 18 Feb 2013 at 8:26Attachments: