• [ Moderator note: moved to Fixing WordPress. ]

    This may seem like a silly question but I’ve been scratching my head for a while now. I’m by no means a coder or customizer but with my slight tech background have been asked by my father to redesign his website running on bones. I’m familiar with PHP and Css but am very, very fresh to Sass or LESS.

    That being said, what I’m trying to do is create a page in bones that incorporates the header and footer but removes the sidebar. The page should be full width and allow my visual composer attributes to appear.

    This is what I’ve come up with:
    <?php
    /*
    Template Name: Full Width
    */
    get_header(); ?>

    <div id=”primary” class=”content-area sixteen columns”>
    <main id=”main” class=”site” role=”main”>

    <?php get_template_part( ‘content/content’, ‘page’ ); ?>
    get_footer(); ?>

    And though it removes any sidebars or widgets it doesn’t allow for my content to appear. Can someone help. Maybe give me the full code I’m missing. It’s gotta be something with the content get_template_part right? This is a architecture firm so all the pages need to be clean and simple. Clearly, clean and simple is not that easy.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Where did you download this theme from?

    Thread Starter ark09050

    (@ark09050)

    I’ve just downloaded that theme for a quick look and there’s absolutely no mention of any content-page.php file nor a content folder in the downloaded theme. where did you get the code that you added to your custom page template? Did you realise that any example code in the Codex here is just that – an example. You have to modify it to suit your theme.

    For that theme, I’d try creating a copy of the theme’s page-custom.php file, renaming it ad amending its name in the content block and then start modifying this new file.

    Thread Starter ark09050

    (@ark09050)

    That’s what I did. I created a new .php file (based off the custom page) renamed it Full Width, then wrote in that short bit of code. The issue is that when I entered that the content section would be blank and the Visual Composer plugin features wouldn’t appear. I’m looking for code that will allow the content to appear. It should be simple .php code right?

    Moderator bcworkz

    (@bcworkz)

    By going totally minimal, you probably removed things that VC needs to do its thing. You should start with a template that’s closest to what you want, rename accordingly, and only remove the call to get_sidebar(). The main area’s width will likely be wrong still. Determine which HTML element actually controls the width and remove the associated class or ID, replacing it with your own. Add the necessary CSS to get the main area to cover the full width.

    Thread Starter ark09050

    (@ark09050)

    Thank You! Are there any good sites that offer basic code for page templates?

    Moderator bcworkz

    (@bcworkz)

    I meant you should select a template from your current theme for adaptation. Templates tend to be unique to each theme and they are rarely interchangeable.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bones Theme Page Manipulation’ is closed to new replies.