• Is there any “If statement” or any other piece of code I can use in the content-page.php to use the_title() function in some pages and a image slider code in others (i.e. the home page) so the slider would only be displayed in that content header for that page only?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author alex27

    (@alex27)

    I’m not sure I understand your question, but as it is slider can be displayed only on home page and only if it displays latest posts. If you want slider on other pages as well you might need a plugin.

    Thread Starter Aguila1213

    (@aguila1213)

    I’m sorry I know im not being very clear in my question but i’ll try to be as much as I can. Im trying to display an image slider only on the home page’s content header where the page title retrieved by the <h2><?php the_title() ?></h2> in the content-main.php appears

    This is the code:

    if (function_exists(‘get_thethe_image_slider’)) {
    print get_thethe_image_slider(‘Slider Name’);
    }

    When I replace the <?php the_title()> with that code the slider appears in every page’s header not just the home or index page. My question would be if there’s any conditon statement where I can show the slider code in home page and the_title() in every other. Sorry again if this isn’t very clear I would greatly appreciate any help.

    Theme Author alex27

    (@alex27)

    There is no content-main.php in GamePress, and the piece of code you mention doesn’t appear anywhere in this theme. Are you sure you’re using GamePress?

    Thread Starter Aguila1213

    (@aguila1213)

    I’m sorry it’s not content-main.php it’s content-page.php my apologies, and I’m sure it’s gamepress here’s the link to the website i’m working on http://www.lanuevaritmo.com If you take a look at it I have the slide in the content header for every page but I would just like to have it for the home or index page let me know what you think, if it’s possible to do so or maybe I’m approaching this the wrong way, thanks for replying

    Theme Author alex27

    (@alex27)

    Try putting the slider code in conditional tag like is_home()

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Question About Titles in header’ is closed to new replies.