• Hi,

    I am wondering if you can help.

    I am trying to set up a completely blank page template.

    I have added a php template removing headers, footers, navigation.I have assigned a class

    sales-landing-page

    An exmaple of a page is below. I have add some content just so i can see whats going on.

    https://bigthinkingonline.com/test-4/

    My problems are the following.

    1. I can’t remove the entry title.
    I have tried by calling the class and by the page id

    sales-landing-page .entry-title {
       display: none;
    }
    
    }
    
    body.page-id-2890 .title {
    	display: none;
    }
    .page-id-2890 .entry-title {
       display: none;
    }

    [Moderator note: Please wrap your code in backticks]

    I have also tried H1 entry title and no difference.

    2. Removing the Inner Wrap

    I can not seem to remove the inner wrap which is fixed at a width of 960px.
    If I use firebug I can see that the <div id=”inner”> is fixed at 960px

    I have tried setting this to max-width= none and max-width 100% and it defaults back to 960px

    body.page-id-2890-inner {
      margin: 0 auto;
      max-width: none;
      overflow: hidden;
      padding: 0px;
      width: 100%;
    }

    I appreciate your help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you sure you’ve linked the right page? I get a 404 page when I visit that site

    Thread Starter jamesd80

    (@jamesd80)

    Hi Andrew,

    try again, sorry.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    When you say you’re trying to remove the entry title, which bit of text is that?

    Thread Starter jamesd80

    (@jamesd80)

    the bit that says “test”
    I have changed the background coluor of the content to make it easier to see

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You said you used this:

    sales-landing-page .entry-title {
       display: none;
    }

    First you’ve accidentally missed the period character (.) or the hash character (#) before the “sales” bit, but I also cannot find an element with a class or ID of “sales-landing-page”. In Firebug, you can see there are other classes on the <body> element that you should be able to target.

    Thread Starter jamesd80

    (@jamesd80)

    sales-landing-page has been/should be set as a class in the php template.

    // Add custom body class to the head
    add_filter( ‘body_class’, ‘add_body_class’ );
    function add_body_class( $classes ) {
    $classes[] = ‘sales-landing-page’;
    return $classes;
    }

    I have tried with (.) and with (#) no differnce.
    I can see other body classes that are restricted by the 960px but to me they all seem to be based on the innner.

    When inspecting elements using google chrome if I change max width of inner to none.I get the full page I am looking for (see image) https://screencast.com/t/PAbQc1q3gV

    However I can not get that to stick by edits in the css

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    has been/should be set as a class in the php template.

    I’ve always added that stuff to the functions.php file, rather than the template file. Does it work there?

    Thread Starter jamesd80

    (@jamesd80)

    I believe so.
    Either way you should still be able to change the css of the page by calling

    .page-id-2890

    and that doesnt seem to work either.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Where are you adding your CSS modifications?

    Thread Starter jamesd80

    (@jamesd80)

    At the very end of the CSS file

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try running this at the end of your style.css file:

    body {
       border: 10px solid red !important;
    }

    If that doesn’t work then you either have a syntax error or are putting your code inside of something obscure like a media query.

    Try using a CSS validation service to identify the errors https://jigsaw.w3.org/css-validator/

    Thread Starter jamesd80

    (@jamesd80)

    yep, I have the red border!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Blank Page Template’ is closed to new replies.