Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Code Placement WordPress

I need to know where to place the code for the 'Dynamic Content Gallery plugin' by
http://www.studiograsshopper.ch/

I am using Genesis / Magazine theme, and I believe I am supposed to place the code in the home.php of the theme directory, but I have no idea where it should go.

<code><?php dynamic_content_gallery(); ?><code>

Answers (3)

2011-07-05

Peter Michael answers:

I'm sure you have read [[LINK href="http://www.studiograsshopper.ch/dynamic-content-gallery/documentation/"]]How to add the Dynamic Content Gallery to your Theme[[/LINK]] ?


Peter Michael comments:

You can use https://gist.github.com/ to paste any code you may have and post the link here or edit your question and place any code between <code></code> tags.


Peter Michael comments:

That should have been: &lt;code&gt;&lt;/code&gt;

2011-07-05

Duncan O'Neill answers:

From the plugin page's [[LINK href="http://www.studiograsshopper.ch/dynamic-content-gallery/quick-start-guide/"]]quick start guide[[/LINK]]:

"Make sure that you do not place this code within the main Loop or within a WP_Query loop in your template file. This code must be outside of the Loop."

I'm not sure of the file structure for that genesis theme, but it looks as if you need to place the code before this;

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

Search your theme's folder for that string to find where in the theme the loop is called, if necessary, and place your code before that.

If that reaps no rewards, there also a [[LINK href="http://www.studiograsshopper.ch/dynamic-content-gallery/configuration-guide/"]]configuration guide[[/LINK] for the plugin.

hope this helps


David Taylor comments:

yes it did. Thank you.

2011-07-08

donald91 answers:

Hi,
maybe you can also use the "execphp" plugin to get php code working in posts.
make sure you're using the html-editor when putting the code into a page / post.
greetings