custom post types not showing.

I have 3 different custom post types in my wp install and I figured out how to show the custom fields fine with the theme I have. Along with the theme I created I also have templateer which allows extra theme options and page templates.

The problem I am having is that when i choose a page template, 1 of the options is to be able to choose a category from posts.

none of the custom post types show up in this list only the uncategorized category from the default posts section.

Here is the code from the page template file.



Template Name: Magazine 1a





include get_template_directory().”/includes/tt_meta.php”;

global $custom_metabox_mag1;

$meta_test1 = $custom_metabox_mag1->the_meta();

$home_page_sheet_style = $meta_test1[‘home_page_sheet_style’];

$hp_widgetized_position = $meta_test1[‘hp_widgetized_position’];

$hp_top_margin_choose = $meta_test1[‘hp_top_margin_choose’];

$hp_top_margin_t = $meta_test1[‘hp_top_margin_t’]; if ($hp_top_margin_t == ”:wink: $hp_top_margin_t = 0;

$hp_top_margin_r = $meta_test1[‘hp_top_margin_r’]; if ($hp_top_margin_r == ”:wink: $hp_top_margin_r = 0;

$hp_top_margin_b = $meta_test1[‘hp_top_margin_b’]; if ($hp_top_margin_b == ”:wink: $hp_top_margin_b = 0;

$hp_top_margin_l = $meta_test1[‘hp_top_margin_l’]; if ($hp_top_margin_l == ”:wink: $hp_top_margin_l = 0;

$hp_top_margin = $hp_top_margin_t.’px ‘.$hp_top_margin_r.’px ‘.$hp_top_margin_b.’px ‘.$hp_top_margin_l.’px’ ;

$hp_widgetized_show = $meta_test1[‘hp_widgetized_show’];

$home_page_top = $meta_test1[‘home_page_top’];

$home_page_widget_size = $meta_test1[‘home_page_widget_size’];

$home_page_widget_style = $meta_test1[‘home_page_widget_style’];

$title_change = $meta_test1[‘title_change’];

$title_length = $meta_test1[‘title_length’];

$m1_h2_change = $meta_test1[‘m1_h2_change’];

$m1_h2_size = $meta_test1[‘m1_h2_size’];

$all_cats = $meta_test1[‘all_cats’];

$m1_cat = $meta_test1[‘m1_cat’];

if ($all_cats == ‘Yes’:wink: {$m1_cat = ”;}

$m2_img_height = $meta_test1[‘m1_img_height’]; // image height

$m2_img_width = $meta_test1[‘m1_img_width’]; //image width

$m2_content_length = $meta_test1[‘m1_content_length’]; // length of content in characters

$m1_totalposts = $meta_test1[‘m1_totalposts’]; // Total number of posts to display per page

$m1_contentheight = $meta_test1[‘m1_contentheight’]; // height of content box in pixels

$m1_heading_text = $meta_test1[‘m1_heading_text’]; // text in the title for the header above posts

$m1_header_text_include = $meta_test1[‘m1_header_text_include’]; // display header above posts (or not)

$m1_block_transparent = $meta_test1[‘m1_block_transparent’]; // make background color of art-block transparent

$m1_block_padding_choose = $meta_test1[‘m1_block_padding_choose’];

$m1_block_margin_choose = $meta_test1[‘m1_block_margin_choose’];

$m2_style = $meta_test1[‘m1_style’];

$m1_block_padding_t = $meta_test1[‘m1_block_padding_t’]; if ($m1_block_padding_t == ”:wink: $m1_block_padding_t = ‘0’; $m1_block_padding_r = $meta_test1[‘m1_block_padding_r’]; if ($m1_block_padding_r == ”:wink: $m1_block_padding_r = ‘0’; $m1_block_padding_b = $meta_test1[‘m1_block_padding_b’]; if ($m1_block_padding_b == ”:wink: $m1_block_padding_b = ‘0’; $m1_block_padding_l = $meta_test1[‘m1_block_padding_l’]; if ($m1_block_padding_l == ”:wink: $m1_block_padding_l = ‘0’;

$m1_block_padding = $m1_block_padding_t.’px ‘.$m1_block_padding_r.’px ‘.$m1_block_padding_b.’px ‘.$m1_block_padding_l.’px’ ;

$m1_block_margin_t = $meta_test1[‘m1_block_margin_t’]; if ($m1_block_margin_t == ”:wink: $m1_block_margin_t = 0; $m1_block_margin_r = $meta_test1[‘m1_block_margin_r’]; if ($m1_block_margin_r == ”:wink: $m1_block_margin_r = 0; $m1_block_margin_b = $meta_test1[‘m1_block_margin_b’]; if ($m1_block_margin_b == ”:wink: $m1_block_margin_b = 0; $m1_block_margin_l = $meta_test1[‘m1_block_margin_l’]; if ($m1_block_margin_l == ”:wink: $m1_block_margin_l = 0;

$m1_block_margin = $m1_block_margin_t.’px ‘.$m1_block_margin_r.’px ‘.$m1_block_margin_b.’px ‘.$m1_block_margin_l.’px’ ;

$show = $meta_test1[‘show’];

$feat_img = $meta_test1[‘feat_img’];

$hp_mid_image_shadow = $meta_test1[‘hp_mid_image_shadow’];

$img_pos1 = $meta_test1[‘img_pos1’];

if (is_paged()) $is_paged = true;


<style type=’text/css’>

.art-post ul li, .art-post ol ul li {overflow:visible;}

<?php if ($hp_top_margin_choose == ‘Yes’&& $home_page_widget_size == ‘home_page_header_wide’:wink: { ?>#home-top-bg {padding: <?php echo $hp_top_margin ; ?>;}<?php } ?>

<?php if ($hp_top_margin_choose == ‘Yes’ && $home_page_widget_size == ‘home_page_header’:wink: { ?>.home-top-left {padding: <?php echo $hp_top_margin ; ?>;}<?php } ?>

.mini-post {float:left;overflow:hidden;width:50%;}

<?php if ($m1_h2_change == ‘Yes’:wink: { ?>

.mini-post .art-post, .mini-post .art-post a, .mini-post .art-post a:link, .mini-post .art-post a:visited, .mini-post .art-post a.visited, .mini-post .art-post a:hover, .mini-post .art-post a.hovered {font-size:<?php echo $m1_h2_size; ?>px;}

.mini-post .art-blockheader h3.t a, .mini-post .art-blockheader h3.t a:link, .mini-post .art-blockheader h3.t a:visited, .mini-post .art-blockheader h3.t a:hover {font-size: <?php echo $m1_h2_size; ?>px;} <?php } ?>

.mini-post .art-block a:link,.mini-post .art-block a:visited {text-decoration:none;color:inherit;}

.mini-post .art-block img {float:left;<?php if ($m1_block_margin_choose == ‘Yes’:wink: { ?>margin:<?php echo $m1_block_margin ; ?>;<?php } ?>}

<?php if ($m1_block_padding_choose == ‘Yes’:wink: { ?>.mini-post .art-blockcontent-body {padding:<?php echo $m1_block_padding ; ?>;}<?php } ?>

.mini-post .art-blockcontent-body {height: <?php echo $m1_contentheight.’px;’ ; ?>px;}

<?php if ($m1_block_transparent == ‘Yes’:wink: { ?>.art-content-layout .art-content .mini-post .art-block {background-color:transparent;}<?php } ?>

.mini-post .art-post img {float:left;<?php if ($m1_block_margin_choose == ‘Yes’:wink: { ?>margin:<?php echo $m1_block_margin ; ?>;<?php } ?>}

.mini-post .art-postcontent {height: <?php echo $m1_contentheight.’px;’ ; ?>px;}

<?php if ($m1_block_padding_choose == ‘Yes’:wink: { ?>.mini-post .art-postcontent p {padding:<?php echo $m1_block_padding ; ?>;}<?php } ?>


<!–[if IE ]><style type=”text/css”>.mini-post {width:49.9%;}</style><![endif]–>

<?php global $this_post_id; $this_post_id = $post->ID;


if ( theme_get_meta_option($post->ID, ‘theme_show_home_widget’:wink: && !theme_get_meta_option($post->ID, ‘theme_show_home_widget_pos’:wink:){home_page_widget($size);}



if (!is_paged()) {

if ($show == ‘Yes’:wink: {

while (have_posts()) {


get_template_part(‘content’, ‘minimum’:wink:;



} ?>


$temp_query = clone $wp_query;

$paged = (get_query_var(‘paged’:wink:) ? get_query_var(‘paged’:wink: : 1;

$wp_query = new WP_Query(‘cat=’.$m1_cat.’&showposts=’.$m1_totalposts.’&paged=’.$paged);

while($wp_query->have_posts()) : $wp_query->the_post();


<?php //$wp_query = new WP_Query(‘cat=’.$m1_cat.’&showposts=’.$m1_totalposts.’&paged=’.$paged); while($wp_query->have_posts()) : $wp_query->the_post();?>

<div class=”mini-post”>


global $post;

if ($title_change) {

if (strlen($post->post_title) > $title_length) {

$post_title = substr(get_the_title($before = ”, $after = ”, FALSE), 0, $title_length) . ‘…’; } else {

$post_title = get_the_title();

} } else { $post_title = get_the_title(); }



‘id’ => theme_get_post_id(),

‘title’ => ‘ID ) . ‘” rel=”bookmark” title=”‘ . get_the_title() . ‘”>’ . $post_title . ‘‘,

‘class’ => theme_get_post_class(),

‘content’ => tt_get_content_all(


‘feat_img’ => $feat_img,

‘image_width’ => $m2_img_width,

‘image_height’ => $m2_img_height,

‘img_pos’ => $img_pos1,

‘img_shad’ => $hp_mid_image_shadow,

‘content_length’ => $m2_content_length






<?php endwhile;?>

<div class=”cleared”></div>

<?php theme_page_navigation(); $wp_query = clone $temp_query; ?>

<div class=”cleared”></div>

<?php global $this_post_id; if ( theme_get_meta_option($this_post_id, ‘theme_show_sb_bot’:wink: && !theme_get_meta_option($this_post_id, ‘theme_show_sb_bot_wide’:wink: ) {get_sidebar(‘bottom’:wink:;} ?>

<?php get_footer(); ?>

what would I need to add to this to be able to choose from the custom post types?

  • Arnold
    • El Macho WP

    If I understand you correctly, your talking about the “Page Attribute” template, not a theme template? You are also working in the “page” post type?

    Your theme appears to be a generated theme from Artisteer. It’s not a standard theme, it’s custom made for your site?

    Your Templateer is also an Artisteer product?

    I don’t have access to any of these which makes it hard to test anything,

    On your site I don’t see anything for picking a category except the filter on the Custom type lists.

    So basically I can’t figure out what your trying to do or where your trying to do it.

    You say “none of the custom post types show up in this list only the uncategorized category from the default posts section.”

    Why would a list for displaying categories show post types? If your talking about custom taxonomies tehy are limited to the post types they are associated with, The wouldn’t show on a template display “page” post type posts.

    I need a clear explanation of what your trying to do and where your trying to do it. Avoid code until I know what your looking at in the interface.

  • tfbc
    • Site Builder, Child of Zeus

    how come the post types that come with wordpress appear fine in a page attribute template but the custom post types do not.

    when I make custom post types, taxonomies, when i goto the menu i can choose from the categories or individual posts of those custom ones.

    but the page attributes do not show those categories or custom post types.

    i added screenshots of a page edit and what it shows.

    as you can see there only uncategorized shows up. So i need to know how does custompress link to pages.

    the theme is artisteer generated and templateer is the theme options which gives it all the page attributes. I already talked with the templateer support and they are not sure how the custompress part works neither.

    If you want I can send a copy of the wordpress theme to test with.

  • Arnold
    • El Macho WP

    In the custom types > supports you have Page Attributes checked, but the note there tells you that such have to have Hierarchicak set as well, which it wasn’t. I set it on your Adoption post type and the Parent shows up. Template doesn;t show up because you probably haven;t made any for that post type. To make temlpates you need to add some headers

    Also if you are editing on the Page editor, note that “page” is a custom post type that is predefined. There no reason code designed for handling the “page” post type would respond to any other post type unless it’s do so. Here’s an example

    Now the drop down your trying to get won’t appear on anything but “page” post types

    It specifically checks on the core code.

    if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) {
    $template = !empty($post->page_template) ? $post->page_template : false;
    <p><strong><?php _e('Template') ?></strong></p>
    <label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
    <option value='default'><?php _e('Default Template'); ?></option>
    <?php page_template_dropdown($template); ?>
    } ?>

    So it’s not going to appear on the Custom type edit pages. That’s why they call them “Page” Templates.

  • tfbc
    • Site Builder, Child of Zeus

    the templates show up fine under page attributes, the issue im having is that within those templateer page templates they only pull the categories from wordpress’s post categories not the custom post type categories.

    I look under custompress under taxanomies

    adoption_categories is set yes for Hierarchical and Hierarchical URLS.

    So the templates only seem to pull the regular taxonomies not custom ones.

    I dont want these templates to be selectable within each post type at this time.

    the template was designed to make a Page(static) and include content from the different Post Categories along with custom content I want on that static page.

    So maybe Im missing something here…

  • Arnold
    • El Macho WP

    So the templates only seem to pull the regular taxonomies not custom ones.

    “page” is a post type Your on the “page” editor. Associated with “page” are two Taxonomies, “categories” and post_tags”. “categories” is hierarchical, “tags” is not. So “page” is Only going to show those two taxonomies.

    The builtin “categories” and “tags” are associated with “post” and “page” post types.

    “adoptions” is a custom post type you’ve created.. You’ve associated “adoption_categories” taxonomy with it. While it’s called a category because it acts like a category being hierarchical, it’s just a taxonomy separate from WP “categories” . You’ve created no association to “page” posts.

    You can associate the custom taxonomies with both “page” and “adoption_categories” The Adoption categories can then be set on “page” post types.

    Now, is your Templeteer smart enough to handle more than one taxonomy? It appears not. I set both “page” and “adoption_categories” on your “page” post type and the Templeteer doesn’t see it. I do see the WP meta box for Adoption Categories in the page editor. For example do a Quick edit on an Adoption post now. So the limitation is you Templeteer program.

    Artisteer needs to be able to handle multiple taxonomies and all that implies to do what you want if you want to work through their program.

    Note that doing it this way would not retrieve any “adoptions” post type posts if you set them on “page” type posts.

    If you can get away from Artisteer there are some ways you can progrm what you want. You can create a named Template and in the template change the query to actually use an entirely different post type and args. But you have to program it, Not trivial. And I don’t see much advatage because oyu could write custom templates to do the same for the same amount of work without having to override the queries.

  • Tom Eagles
    • Syntax Hero


    Greetings of the day.

    I was doing a regular followup today and found that we missed your last post on this one.

    Are you still seeking support on this one or managed to get it resolved ? Please let us know so that we can take it further and assist you on the same. I also noticed that you are running an old version of the plugin.

    Thanks for being a great community member !



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.