• 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

Putting php code on a page

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 › Putting php code on a page

This topic is: not resolved

Tagged: php

  • This topic has 13 replies, 2 voices, and was last updated 12 years, 5 months ago by Brad Dalton.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • June 14, 2013 at 4:38 am #45829
    nicole2013
    Member

    I have just moved from Thesis to Genesis. I am trying to show the contents of a php file on a page. In Thesis, I used to have a custom template and had the following code in my functions file:

    function after_post_ad() { ?>

    <?php   if (is_page('test')) { // pixenate page tag     include (ABSPATH . '/pixenate/index.php');   }   ?>

    I am trying to get this to work in Genesis.

    Where do I put this code in Genesis and is there anything else that I have to do to get it to work?

    This is what I have tried:

    1)  I copied that code as is in the functions file and it broke the site. I guess I should have changed the first line.

    2) I put it in as a hook without the first line but nothing happened.

    Any help would be much appreciated!

     

    June 14, 2013 at 4:48 am #45834
    Brad Dalton
    Participant

    Could you please paste the entire code on Github Gists or Pastebin and link to it from here. Thanks

    Firstly, you don't need php tags in functions file, only when using PHP in template files or the Simple Hooks plugin.


    Tutorials for StudioPress Themes.

    June 14, 2013 at 5:36 am #45843
    nicole2013
    Member

    This is the contents of the custom template the was used.

    This is the code that was pasted in the functions file (in Thesis it is called the custom functions.php). The first line I guess relates to everything but the next 5 lines are repeated for each page used.

    June 14, 2013 at 5:49 am #45849
    Brad Dalton
    Participant

    Could you link to your site please.

    I think the code is just demo code for creating a custom function but it is incomplete.

    What exactly do you want the code to do?


    Tutorials for StudioPress Themes.

    June 14, 2013 at 7:48 am #45880
    nicole2013
    Member

    http://www.creativecertificates.com/good-behavior-award-certificate-with-photo/

    On the above page the content is inserted into the page using an iframe. I would like to insert it into the page without using an iframe.

    For example:

    http://www.creative-calendars.com/photo-calendar-2013/green/

    here is was inserted via custom template (using the Thesis theme).

     

    June 14, 2013 at 8:20 am #45892
    Brad Dalton
    Participant

    Sorry but i don't follow. What content are you referring to? The entire page or just part of it? How many pages of content are you talking about?

    What type of content is it? Text and images?


    Tutorials for StudioPress Themes.

    June 14, 2013 at 8:50 am #45903
    nicole2013
    Member

    Sorry - it wasn't clear.

    This is the page that I presently have inserted via an iframe but I would like to insert without using an iframe:

    http://www.creativecertificates.com/pixenate/themes/cardmaker/behavior.php

     

    June 14, 2013 at 9:18 am #45912
    Brad Dalton
    Participant

    I think you simply need to copy and paste any text and upload and insert images manually using the WordPress editor.


    Tutorials for StudioPress Themes.

    June 14, 2013 at 10:27 pm #46018
    nicole2013
    Member

    I tried this but it didn't work:

    http://www.creativecertificates.com/2207-2/

    I put the code from the <head> into the Custom Tracking/Conversion Code section and I added the code from the body to the actual post (using the text editor).

    Is that the correct way to do it since it is code and not really text? Have I missed something major?

     

    June 15, 2013 at 4:06 am #46033
    Brad Dalton
    Participant

    What sort of code is it?

    What sort of content is it?


    Tutorials for StudioPress Themes.

    June 15, 2013 at 4:34 am #46037
    nicole2013
    Member

    It is Php code. It edits a photo which is uploaded. It is a program called Pixenate. This is the code (but it also uses other content which it links to which might be the problem)

    http://pastebin.com/nzyG9Jad

    June 15, 2013 at 5:33 am #46045
    Brad Dalton
    Participant

    You'd need a custom page template for that.

    I suggest you try and find a WordPress plugin which does the same thing.

    What is it that you want the code to do?


    Tutorials for StudioPress Themes.

    June 15, 2013 at 10:43 pm #46220
    nicole2013
    Member

    I would love to find a WordPress plugin which does the same thing but I have spent months looking and haven't found one.  I don't mind (in fact I would prefer) a premium plugin.

    Basically what I am looking to do is to upload an image and enable users to add text and a photo to the image. It is basically the same functions used when producing photo books. Sites like Shutterfly, Snapfish, etc. provide the background images and users upload photos which are added to the background. I'm sure that there are better programs out there but unfortunately I haven't been able to find one.

    June 16, 2013 at 4:11 am #46228
    Brad Dalton
    Participant

    I'd try the Plugins forum at the WordPress.org forums for this as there's many plugin Developers working there.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 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

© 2025 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