WordPress.org

Ready to get started?Download WordPress

Forums

GamePress
Question About Titles in header (6 posts)

  1. Aguila1213
    Member
    Posted 1 year ago #

    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?

  2. alex27
    Member
    Theme Author

    Posted 1 year ago #

    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.

  3. Aguila1213
    Member
    Posted 1 year ago #

    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.

  4. alex27
    Member
    Theme Author

    Posted 1 year ago #

    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?

  5. Aguila1213
    Member
    Posted 1 year ago #

    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

  6. alex27
    Member
    Theme Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags