• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis Sample Theme no index.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Genesis Sample Theme no index.php

This topic is: resolved
  • This topic has 14 replies, 3 voices, and was last updated 11 years, 6 months ago by Alexanderleo.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • February 20, 2015 at 12:01 pm #141496
    Alexanderleo
    Member

    Hello

    I have this plugin installed on my website

    When I want to activate it on my I need to insert a specific code in the wp-content/themes/<YOUR THEME NAME>/index.php

    But the Genesis Sample Theme does not have this index.php file under "Editor" in WordPress admin.

    What do I do?

    http://www.skoleanalyser.dk
    February 20, 2015 at 12:22 pm #141506
    Brad Dalton
    Participant

    If you look at the WordPress Template Hierarchy, WordPress looks for home.php and then index.php so if your site includes a home.php file your plugin will use that.

    Otherwise, WordPress will use the front-page.php file first if it exists.

    Sounds like you need to edit a file and add some code for your plugin to work?


    Tutorials for StudioPress Themes.

    February 20, 2015 at 1:08 pm #141519
    Alexanderleo
    Member

    Hello

    The plugin is this: https://wordpress.org/plugins/wp-postratings/installation/

    To install the plugin I need to find this in the index.php file: <?php while (have_posts()) : the_post(); ?>

    If I do this the post rating system will be everywhere. I can instead insert i in the post.php but I only have a style.css and functions.php

    The problem is I only have these two files and missing all the others in my Genesis Sample Theme?

    February 20, 2015 at 1:12 pm #141520
    Brad Dalton
    Participant

    What pages do you want it to display on?


    Tutorials for StudioPress Themes.

    February 20, 2015 at 2:31 pm #141545
    Alexanderleo
    Member

    Only on my post.

    February 20, 2015 at 5:40 pm #141577
    Brad Dalton
    Participant

    I did write about this but its on my membership site so its premium content


    Tutorials for StudioPress Themes.

    February 21, 2015 at 1:22 am #141608
    Genesis Developer
    Member

    You can try this code in your functions.php file

    add_action('genesis_entry_footer', 'gd_add_rating', 18);
    function gd_add_rating(){
       if ( function_exists( 'the_ratings' ) ) { the_ratings(); }
    }

    if you want it just below the post/page content then you can try this hook

    add_action('genesis_entry_content', 'gd_add_rating', 18);


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 21, 2015 at 4:29 am #141618
    Alexanderleo
    Member

    Hey dude

    It almost helped me. As you can see on this page the ratings is in the bottom of the post http://skoleanalyser.dk/det-ser-meget-almindeligt-ud-af-julia-butschkow-analyse/

    But I want it ti be in the beginning like on my other site: http://alexanderleo.dk/forskellen-pa-en-almindelig-printer-og-en-fotoprinter/

    February 21, 2015 at 4:42 am #141619
    Genesis Developer
    Member

    Please remove the above hook and try this

    add_action('genesis_entry_header', 'gd_add_rating', 8);


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 21, 2015 at 5:07 am #141621
    Alexanderleo
    Member

    I know I'm very hard to satisfy but is it possible to get the ratings under the headline and my byline?

    You can see how it is now: http://skoleanalyser.dk/det-ser-meget-almindeligt-ud-af-julia-butschkow-analyse/

    And I want it like this http://alexanderleo.dk/forskellen-pa-en-almindelig-printer-og-en-fotoprinter/

    February 21, 2015 at 5:10 am #141622
    Alexanderleo
    Member

    I got it to work. I just edited the 8 to 12. Thank you very much! 🙂

    February 21, 2015 at 5:23 am #141623
    Genesis Developer
    Member

    Great. Please mark this thread as RESOLVED.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 21, 2015 at 3:55 pm #141681
    Alexanderleo
    Member

    Hello again

    Is it possible to add some code so the ratings don't show on pages but only on post?

    February 21, 2015 at 10:19 pm #141698
    Genesis Developer
    Member

    Replace the current function by this one

    function gd_add_rating(){
       if ( function_exists( 'the_ratings' ) && is_singular('post') ) { the_ratings(); }
    }

    See Codex about is_singular() http://codex.wordpress.org/Function_Reference/is_singular


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 22, 2015 at 3:43 am #141727
    Alexanderleo
    Member

    It crashed my website. So I can't access it right now. Have to remove it trough ftp.

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble