How to arrange different post categories in template
How to arrange different post categories in template
How to arrange different post categories in template
I have seen you Html structure, You need to change structure like this.. Follow this structure for you own template file… <div id=”wrapper”> <div id=”header”> <!– Here goes the header part –> </div> <div id=”main”> <!– Here goes the main content part –> </div> <div id=”sidebar”> <!– Here goes the sidebar part –> </div> </div>
Line #45 of loop-single-reply.php (Source) <?php bbp_reply_author_link( array( ‘sep’ => ‘<br />’, ‘show_role’ => true ) ); ?> See Also: http://codex.bbpress.org/bbp_reply_author_link/ http://codex.bbpress.org/bbp_topic_author_link/
Three questions per post is not typical; however, as they may all be inter-related I’ll try to help step through each one in turn. The first problem may be simple: When I go to mysite.com/success-stories/, it’s using the default archive.php template. However, I have created a template called archive-successstories.php and it’s being totally ignored. The … Read more
How to install a wordpress website template on an existing website?
Something like the following should work: function my_header() { ob_start(); include(get_template_directory() .’/file.php’; $content = ob_get_clean(); return $content; } add_shortcode(‘include’, ‘my_header’);
Try naming the file page-template-articles.php but leave the file contents and header name – “Template Name: Articles” the same. Right now, you might be running into a reserved naming collision within WP with how Custom Post Type templates are named, i.e. articles-page.php is a page template name for a CPT called articles.
solution here as function: function testchildren () { global $post; $childtest = get_pages(‘child_of=”.$post->ID); if( count( $childtest ) != 0 ) { return false; } else { return true; } } and implementation as markup: <?php if (have_posts()) : while (have_posts()) : the_post() ; ?> <h2><?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?> </h2> <?php if ( … Read more
According to the Codex, get_user_id_from_string() is deprecated, and should be replaced with get_user_by(). <p> <?php $thisblog = get_current_blog_id(); // probably don’t need this anymore $admin_email = trim( get_option( ‘admin_email’ ) ); $admin_user = get_user_by( ’email’, $admin_email ) ); $phone_number = get_user_meta($admin_user->ID, ‘phone’, true); if($phone_number!=”) { ?> <?php echo $phone_number; ?> <?php } else { ?> … Read more
To display a menu you need to use the wp_nav_menu function (Codex reference). Try changing your template file to use the following code: <?php wp_nav_menu( array( ‘theme_location’ => ‘main-menu’ ) ); ?>