Tag Info

Hot answers tagged

3

Your terminology is a bit scrambled here. A custom taxonomy is a taxonomy which you manually register through register_taxonomy. In your case that is ait-dir-item-category. Any "category" (as you call it) you create in your custom taxonomy is called a term. In this case events. To create a custom page for events, you need to name your template ...


2

You can try the the_content filter, to append/prepend text to the post content. Here's a simple example: add_filter( 'the_content', function( $content ) { if( is_single() && has_tag( 'follow-me-on-twitter' ) ) { $content .= '<div>Like my posts? Follow me on twitter!</div>'; } return $content; }, 99 ); where ...


2

May be something is wrong on your page template file. Have your added page template name at top of the page like this: <?php /* Template Name: My Custom Page */ Try with this and check once again. You can check WordPress document for creating custom page template. Check this link: Page Templates


1

According to the Codex, your custom page template must have a header containing the name of the template. All page templates must be named in this way, or they will not appear in the "Template" dropdown. Here's an example, make sure your custom template has a header in this format: <?php /* Template Name: My Custom Page */ // Your custom page template ...


1

One way is to have a single front-page.php and then using get_template_part(), to show different content based on user choice. Rough code: get_header(); $layout = get_option( 'front_page_layout', 'default' ); get_template_part( 'front-page', $layout ); get_footer(); After that you need to create a file for every layout, they should be called, something ...


1

As Pages are a special built in Posttype, they get an own template hierarchy. Other "normal" post types and custom post types can only be templated by "single-$posttype.php". You can however hook into the single_template filter and make wordpress redirect to your template file: function get_custom_post_type_template($single_template) { global $post; ...


1

You could just include it in your functions.php: if ( ! is_admin() ) { include ABSPATH . 'wp-admin/includes/template.php'; }



Only top voted, non community-wiki answers of a minimum length are eligible