Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Im not sure on how to do this .. But what i want to do is .

  1. Move the Page/Single Post Page title.
  2. Remove the title for Homepage only.
  3. Keep the titles of my posts. (Loop page) or (Blog Page)

Here's what i have:

    remove_action('genesis_post_title', 'genesis_do_post_title');
    add_action ('genesis_after_header','title_slider');
        function title_slider() {
            if (is_page('Home')) {
                remove_action('genesis_after_header', 'genesis_do_post_title');
            } 

            if (is_page() || is_single()){
            echo "<div class='main-title-bg'>";
            the_title( '<h1>', '</h1>' );
            echo "</div>";
        }
    }

It did move the single post / page titles, also it did remove the title in the Homepage..

But When i check my BLOG page, the titles are not there...

Here's the structure i want for the BLOG page (A typical normal blog page structure)


(logo)(menus)
BLOG PAGE TITLE


Post title here
posted by: meh etc.
Content here..
readmore...


Post title here
posted by: meh etc.
Content here..
readmore...


Post title here
posted by: meh etc.
Content here..
readmore...


I hope everything is clear! Thanks guys!

share|improve this question
    
How is your home page setup? Check the Settings > Reading option page in the Admin. It looks like you are using a static home page. While this is possible in Genesis, most of its child themes are specifically set up for use with home (and blog) pages that are not static. Using a static front page is often left untested by the theme author. –  Charles Clarkson Nov 27 '13 at 5:20
    
Front page displays: Front page: Home <-- Page Posts page: Blog <-- Page –  Jeremi Liwanag Nov 27 '13 at 6:10
    
I need this kind of setup.. even i remove that setup and change it to latest posts. still the titles for the blogs doesn't show –  Jeremi Liwanag Nov 27 '13 at 6:13
    
Okay. Next question: What is the name of the Blog page, what is its page ID and which Page Template is assigned to it? You can find that information in the Blog page editor in the admin. –  Charles Clarkson Nov 27 '13 at 12:08
    
Hi Charles, the name of the blog page is 'Cases' page ID is 15 it is using the default template. –  Jeremi Liwanag Nov 28 '13 at 0:51
add comment

1 Answer

up vote 1 down vote accepted

Try this:

add_action( 'template_redirect', 'wpse_124609_remove_titles' );
/**
 * Move or remove some post titles.
 */
function wpse_124609_remove_titles() {

    if ( is_front_page() ) {
        remove_action( 'genesis_post_title', 'genesis_do_post_title' );

    } else if ( is_page() || is_single() ) {
        remove_action( 'genesis_post_title', 'genesis_do_post_title' );
        add_action( 'genesis_after_header', 'title_slider' );
    }
}

/**
 * Add Title Slider to some post titles.
 */
function title_slider() {
    echo "<div class='main-title-bg'>";
    the_title( '<h1>', '</h1>' );
    echo "</div>";
}
share|improve this answer
    
You really rock men!!! –  Jeremi Liwanag Nov 28 '13 at 11:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.