Note that there are some explanatory texts on larger screens.

plurals
  1. POwordpress custom post template not working
    text
    copied!<p>I created another menu in wordpress dashboard, it functions like the post menu, I wanted to apply a customized template to that menu I created. sample, the menu is called "TEchnologies Page", in my editor I created a technologies.php page which initialize the contents I want to display on my technology template, I already registered the the new menu category to functions.php but the problem is wordpress does not recognize the template I created for that menu, when I opened the content type it still has the normal appearance..</p> <p>I have this code;</p> <p>functions.php</p> <pre><code> // category function TechnologiesRegister() { $labels = array( 'name' =&gt; _x('Technologies', 'post type general name'), 'singular_name' =&gt; _x('Technologies', 'post type singular name'), 'add_new' =&gt; _x('Add New Technologies', 'portfolio item'), 'add_new_item' =&gt; __('Add New Technologies'), 'edit_item' =&gt; __('Edit Technologies'), 'new_item' =&gt; __('New Technologies'), 'view_item' =&gt; __('View Technologies'), 'search_items' =&gt; __('Search Technologies'), 'not_found' =&gt; __('Nothing found'), 'not_found_in_trash' =&gt; __('Nothing found in Trash'), 'parent_item_colon' =&gt; '' ); $args = array( 'labels' =&gt; $labels, 'public' =&gt; true, 'publicly_queryable' =&gt; true, 'show_ui' =&gt; true, 'query_var' =&gt; true, 'capability_type' =&gt; 'post', 'hierarchical' =&gt; false, 'menu_position' =&gt; null, 'supports' =&gt; array('title', 'editor', 'thumbnail'), 'rewrite' =&gt; true, 'show_in_nav_menus' =&gt; false, ); register_post_type('technologies', $args); } add_action('init', 'TechnologiesRegister'); // end category </code></pre> <p>technologies.php</p> <pre><code> &lt;?php /* Template Name: Technologies Page*/ ?&gt; &lt;?php get_header(); ?&gt; &lt;head&gt; &lt;style type="text/css"&gt;.social-wrap {margin-top: 79px !important;}&lt;/style&gt; &lt;/head&gt; &lt;div class="container technologies"&gt; &lt;div class="row"&gt; &lt;?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array('post_type' =&gt; 'technologies', 'paged' =&gt; $paged, 'posts_per_page' =&gt; 500); query_posts($args); while (have_posts()) : the_post(); ?&gt; &lt;div class="span3 technologies-icon"&gt; &lt;?php $attachment_id = get_field('image'); $size = "full"; $image = wp_get_attachment_image_src($attachment_id, $size); ?&gt; &lt;img src="&lt;?php echo $image[0]; ?&gt;" class="pull-right" /&gt; &lt;/div&gt; &lt;div class="span9 technologies-desc"&gt; &lt;h4&gt;&lt;?php the_title(); ?&gt;&lt;/h4&gt; &lt;?php the_content(); ?&gt; &lt;/div&gt; &lt;?php endwhile; ?&gt; &lt;/div&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload