yazmincoveney
Forum Replies Created
-
I am also trying to modify my functions.php in a child theme. Ultimately I want to exclude specific categories from my blog home page. I am using this code, but it doesn’t seem to do anything.
<?php function exclude_category($query) { if ( $query->is_home ) { $query->set('cat', '-10 -11 -12'); } return $query; } add_filter('pre_get_posts', 'exclude_category'); ?>
Forum: Themes and Templates
In reply to: Adding a background image to content area of Twenty TenThat did it!
Thank you, thank you!!
Forum: Themes and Templates
In reply to: Adding a background image to content area of Twenty TenI forgot the above did not work.
Forum: Themes and Templates
In reply to: Adding a background image to content area of Twenty TenNot sure if I understood correctly, but in my css I added (my custom template page is called main.php)
`.page-template-main #main {
clear: both;
overflow: hidden;
padding: 40px 0 0 0;
background-image:url(images/home_bg.jpg);
}`Then in the custom template page, I left the code:
`<?php
/*
Template Name: Main Page
*/get_header(‘main’); ?>
<div id=”container”>
<div id=”content” role=”main”><?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class=”entry-title”><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
<?php } ?><div class=”entry-content”>
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”>’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
</div><!– .entry-content –>
</div><!– #post-## –><?php endwhile; ?>
</div><!– #content –>
</div><!– #container –><?php get_footer(); ?>`
Forum: Themes and Templates
In reply to: Adding a background image to content area of Twenty TenI should add that the above suggestion added the background to all the pages. Not just the home page.
Forum: Themes and Templates
In reply to: Adding a background image to content area of Twenty TenThat put the background behind the text not in the whole content area.
The site I am working on is not published, but here is a mock up of what I am trying to do. This is a large jpg and not a WP site: https://www.zupababy.com/hl/home_navy.htm
Forum: Fixing WordPress
In reply to: edit of index.php has no affectDanielPh, did you ever get this figured out? I tried the same thing, as I am trying to customize my index.php page. I expected the page to break when I removed the header and footer but nothing happened.