• Resolved Andeh86

    (@andeh86)


    Hi guys,

    im trying to set pages to have different templates, looking at the actual site for custom community there should be a list of templates when you create a new page (as shown here:
    http://www.custom-community.themekraft.com/page-templates-2/ )

    I only have ‘default’, ‘full width’ and ‘Links. Does any one know how i can get the rest of them there? ive googled around for days but cant find an answer!

    When i look in the template settings all of them show up to set as the default, but i need access to all of them!

    Hope you can help.

    Andeh

Viewing 15 replies - 1 through 15 (of 35 total)
  • Thread Starter Andeh86

    (@andeh86)

    Any one got any ideas?

    Thread Starter Andeh86

    (@andeh86)

    I made a fix myself… i did it by creating my own template. it wasnt the easiest of solutions for some one who is just starting out on wordpress, but if any one wants to know the code i used then let me know.

    What i did was created a template to have left and right side bars and set the left side bar as default.

    Great! maybe you can assist me, I need a custom full width template, no sidebars. So far I can’t do it, even with cc premieum support! Seems no one can say what makes the templates get their sidebars. perhaps you discovered the secret?

    thanks!

    Thread Starter Andeh86

    (@andeh86)

    What do you mean custom full width template? because you can set the template to be full with on each page as default?

    I know, but I need it as my attachment page. That can’t be set as default except through template code.

    Also, I want an additional custom full width page template, but there’s no way to specify full width in the template code, it comes from the header, somehow. I’ve been in contact with premium support, they can’t seem to do it either.

    Thread Starter Andeh86

    (@andeh86)

    When i created my template to have the two side bars i created a new PHP file with the following at the top:

    <?php
    /*template name: insert-name
    */?>

    If you create a .php file with only that in it, place it in your template folder, it will create a new item in the dropdown for your templates in the ‘attribute’ window.

    then i placed the code i needed underneith the title code and created the template i needed.

    I dont quite understand what you mean by a custom full width template, how custom can full width get other than full width with no side bars? which is a default template already provided.

    I had to create a right hand side bar just for about 4 pages, and keep the others as a left hand side bar, so i created my L+R template and then set the default to left side bar. This then gave me the option of full width, left, or left and right.

    Can you explain further what you mean by a full width template? and i might be able to help further.

    it’s the same full width template as default, but it includes custom queries and some specific css. Not too unussual for a custom page really.

    However my main goal is to get a full width attachment template. Don’t you find it odd that the cc theme has a sidebar on it’s attachment page? And even odd-er, the attachment page template doesn’t show image attachments. So I had to make a custom template to show images. Still, I can’t make it full width.

    I had to create a right hand side bar just for about 4 pages, and keep the others as a left hand side bar, so i created my L+R template and then set the default to left side bar. This then gave me the option of full width, left, or left and right.

    If you know how to tell custom community templates how many sidebars they should have, I’m all ears. What was the code used to get the different sidebar configs?

    THanks!

    Here’s my site, On the map click “CA” then “Bakersfield”, you’ll see the post below the map. Click a post image and you’ll see my attachment page that I’d like full width and no sidebars.
    site

    Thread Starter Andeh86

    (@andeh86)

    the code i used was an omalgimation from the page.php and sidebar.php code. It is pretty fudged but it works fantastically as long as no page content is straight copied from word(an error i found, but not uncommon)

    <?php /*template name: L+R side bars
    */?>
    
    <?php get_header() ?>
    
    	<div id="content" >
    <?php do_action( 'bp_before_sidebar' ) ?>
    <div class="v_line v_line_right"></div>
    <div id="sidebar" class="widgetarea">
    	<div class="right-sidebar-padder">
    
    	<?php do_action( 'bp_before_after_sidebar' ) ?>
    	<?php if( ! dynamic_sidebar( 'sidebar' )): ?>    
    
    	<?php if ( is_singular() ) { ?>
    		<div class="widget">
    			<h3 class="widgettitle" ><?php _e('Recent Posts', 'cc'); ?></h3>
    			<ul>
    				<?php
    				$myposts = get_posts('numberposts=5&offset=0&category=0');
    				foreach($myposts as $post) : setup_postdata($post);
    				?>
    				<li><span><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span></li>
    				<?php endforeach; ?>
    			</ul>
    		</div>
    	<?php } else { ?>
    		<div class="widget">
    			<h3 class="widgettitle" ><?php _e('Random Posts', 'cc'); ?></h3>
    			<ul>
    				<?php
    				$rand_posts = get_posts('numberposts=5&orderby=rand');
    				foreach( $rand_posts as $post ) :
    				?>
    				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    				<?php endforeach; ?>
    			</ul>
    		</div>
    	<?php } ?>
    	<div class="widget tags">
    		<h3 class="widgettitle" ><?php _e('Search by Tags!', 'cc'); ?></h3>
    		<div><?php wp_tag_cloud('smallest=9&largest=18'); ?></div>
    	</div>
    	<div class="widget">
    		<h3 class="widgettitle" ><?php _e('Archives', 'cc'); ?></h3>
    		<ul>
    			<?php wp_get_archives( 'type=monthly' ); ?>
    		</ul>
    	</div>
    	<div class="widget">
    		<h3 class="widgettitle" ><?php _e('Links', 'cc'); ?></h3>
    		<ul>
    			<?php wp_list_bookmarks('title_li=&categorize=0&orderby=id'); ?>
    		</ul>
    	</div>
    	<div class="widget">
    		<h3 class="widgettitle" ><?php _e('Meta', 'cc'); ?></h3>
    		<ul>
    			<?php wp_register(); ?>
    			<li><?php wp_loginout(); ?></li>
    			<?php wp_meta(); ?>
    		</ul>
    	</div>
    
    	<?php endif; // end primary widget area ?>
    
    	<?php do_action( 'bp_inside_after_sidebar' ) ?>
    
    	</div><!-- .padder -->
    </div><!-- #sidebar -->
    
    <?php do_action( 'bp_after_sidebar' ) ?>
    		<div class="padder">
    
    <?php do_action( 'bp_after_sidebar' ) ?>
    
    		<?php do_action( 'bp_before_blog_page' ) ?>
    
    	<div class="page" id="blog-page" >
    
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    				<h2 class="pagetitle"><?php the_title(); ?></h2>
    
    				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    					<div class="entry">
    <table style="width: 500px;">
    <tbody>
    <tr>
    <td>
    						<?php the_content( __( '<p class="serif">Read the rest of this page &rarr;</p>', 'cc' ) ); ?>
    						<div class="clear"></div>
    						<?php wp_link_pages( array( 'before' => __( '<p class="cc_pagecount"><strong>Pages:</strong> ', 'cc' ), 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </td>
    </tr>
    </tbody>
    </table>
    					</div>
    					<div class="clear"></div>
    
    				</div>
    
    			<?php endwhile; endif; ?>
    
    		</div><!-- .page -->
    		<?php cc_list_posts_on_page(); ?> 
    
    		<div class="clear"></div>
    
    		<?php edit_post_link( __( 'Edit this page.', 'cc' ), '<p class="edit-link">', '</p>'); ?>
    
    		</div><!-- .padder -->
    	</div><!-- #content -->
    
    <?php get_footer() ?>

    This is the whole code, let me know how it fairs for you, as far as im aware i didnt do anything else than create this .php file and stick it in the templates root folder. (i.e /wp-content/templates/custom community/ (this automatically gives you a new template dropdown))

    Like i said before what you could do is try copy the actual content from the full-width.php and stick it into a new PHP file called somethike customFW.php or some thing like that. I dont know how well that would work though, and then add in your own custom code to that file and see how you get on.

    dont forget to give your template a name though using

    <?php
    /*template name: insert-name
    */?>
    Thread Starter Andeh86

    (@andeh86)

    wow, clicking Bakersfield is near impossible, im guessing your changing that? i had to zoom in on the site to view it!

    Have you tried using firebug to edit the code and see what needs changing? im guessing you just need to remove the padding on the sides to get the full site? i just gave it a go. and that gave me a full view of everything. im guessing thats your issue? the padding is cutting off the sides of the page?

    Thats the point of the zoom. There’s going to be too many locations to show them all big. I’ll make the “please zoom” message bigger. But thanks for the feedback.

    I’m well versed in creating custom pages, this is a special case, as you know by what you had to do to control sidebars. It’s not easy with this theme, not even for the premium support staff, they couldn’t (or wouldn’t) do it.
    Thanks so much for the code, I’ll play with it. The CC staff may be intersted in it too.

    I reccomend firebug all the time, been using it extencively for this project. Feel free to take a crack at it!

    Thanks so much!

    I copied your code before it gets dumped, it’s too long for the forums. Use pastebin πŸ™‚

    Thread Starter Andeh86

    (@andeh86)

    I think it may be a case of ‘wouldnt’ do it more than could’nt, what with the fact they created the theme, but hey ho! they may take your advice and add a new module into a theme update! let me know how the template goes for you, ide be interested to see what you come up with.

    I didnt realise that this forum had a code limit on it, so i shall use pastebin from now on on here! thanks.

    odd, I don’t see where it calls the left and right sidebars.. and I see specific “widget areas” defined.. Are these custom sidebars? did you have to register them in functions.php? I’m not sure what I’m looking at here.

    i just gave it a go. and that gave me a full view of everything

    I’d love to see the css which produced this, I couldn’t locate it in firebug. I’m more than willing to create new padder descriptions in css for this template.

    Thread Starter Andeh86

    (@andeh86)

    do you have the latest version of the custom community theme? because all the code i used relates back to files that are located in the theme template folders.

    I definatly didnt change the functions.php, just created the new .PHP

    the custom widgets that are in there are for if you have no widgets assigned to the right hand side bar, it automatically puts something there. there is a style.php which has a shed load of code that is for the main frame work of the site that is located in this route:
    custom-community\core\includes\theme-generator

    Try load that file into notepad++ and do a ctrl+f for the section your looking to change. Though looking at your site now it looks fixed, have you changed anything?

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘[theme: Custom Community] Templates not showing’ is closed to new replies.