Main content template using under-the-influence theme
-
First post and I am a noob.
I have a theme installed (obviously) called under the influence. I have a static page for my contact page and I want to display the content of the page only with no meta information showing like the sidebar and the calendar archive below the content.
Here is what I am working with:
https://toddhartsfield.com/blog/?page_id=5I have reviewed the conditional tags in php from word press like is_page(), is_page(‘contact’), the_content() and it is all confusing to me.
I found this tutorial that uses a different theme, but has the general idea to remove the sidebar:
https://blogigs.com/how-to-add-a-no-sidebar-page-to-your-wordpress-theme/
followed it but it didn’t work. It makes no since to me that I have to add additional IDs and Classes in the style.css file anyway.
Isn’t there an easier way to just shoe the content and not the main content?
It amazes me that there is not an image to give an idea of how a page is setup- like a DOM or something.
<html>
<head>
</head>
<body>
\\blahh
</body>
<footer>
</footer>
</body>is it:
<?php
/*
Template Name: name of template
*/get_header(); ?>
<div id=”content_container”>
/*<?php get_sidebar(); ?> */ #just leave this out??<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
<h2><?php the_title(); ?></h2>
<div class=”entry”>
<?php the_content(__(‘<div class=”read_more”>read more »</div>’, ‘uti_theme’)); ?><?php wp_link_pages(array(‘before’ => __(‘<div class=”navigation”><p>Pages: ‘, ‘uti_theme’), ‘after’ => ‘</p></div>’, ‘next_or_number’ => ‘number’)); ?>
<?php edit_post_link(__(‘Edit this entry.’, ‘uti_theme’), ‘
<p>’, ‘</p>’); ?><p class=”postmetadata”></p>
</div><!–.entry–>
<?php comments_template(); ?>
</div><!–.post–>
<?php endwhile; endif; ?></div><!–#content–>
</div><!–#content_container–><?php get_footer(); ?>
</html>I have gotten these custom template to upload in the proper folder so I can choose it in the dashboard but no template is changing anything. I assume it is because the theme overrides the template but wow… for something that should be so simple is giving me a headache. Help or direction to find the right answer would help me tremendously.
ThanlkYOu in advance!
- The topic ‘Main content template using under-the-influence theme’ is closed to new replies.