Support » Fixing WordPress » help with is_page approach

  • 2.2.1, to be exact.

    I am using this sort of statement:

    elseif (is_page(10)) {
    the_title('<h2><a href="/consulting-services/" title="Consulting Services">Consulting Services</a> ','</h2>');
    echo c2c_get_custom('heading-tagline','<p>','</p>','');

    which works… but I’d rather not hard code the parent page’s post slug and post name into my code…

    any ideas on re-writing this? I have 5-6 of these child pages where I want the parent page’s name and permalink (and name as the title tag) to show up.

    I am not sure how to access $post->$postname? or similar in the middle of the_title conditional before and afters.

    Help GREATLY appreciated! TIA

  • The topic ‘help with is_page approach’ is closed to new replies.