Forum

Please make sure that you have read the documentation and extensive resources provided on this site before posting your question!

Dynamic Content Gallery Resources

DCG Version 4.0 beta is now available for download and testing. This is a development version and not recommended for live sites. Read more here.

Note that the current stable release of the DCG is version 3.3.5.

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Home php.
Status: closed
November 26, 2011
6:54 pm
colours 1
Member
Forum Posts: 5
Member Since:
November 26, 2011
Offline

Hi there,
I am making a simple error I think. I have tried to put the DCG code into my home php in my genesis theme, but it won't work. This is the code I am using

<?php dynamic_content_gallery(); ?>

this is my home php

<?php get_header(); ?>

<?php genesis_before_content_sidebar_wrap(); ?>
<div id="content-sidebar-wrap">

<?php genesis_before_content(); ?>
<div id="content" class="hfeed">
<?php genesis_before_loop(); ?>
<?php if (!dynamic_sidebar('Homepage')) : ?>
<?php genesis_do_loop(); ?>
<?php endif; ?>
</div><!– end #content –>
<?php genesis_after_content(); ?>

</div><!– end #content-sidebar-wrap –>
<?php genesis_after_content_sidebar_wrap(); ?>

<?php get_footer(); ?>

I have tried to put the DCG code after

<div class="hfeed">

but it won't work. I am using a static home page.

November 26, 2011
8:07 pm
Ade
Admin
Forum Posts: 2493
Member Since:
August 25, 2008
Offline

If you are using a static home page, then the theme won't use home.php to display it. It will use page.php instead. Therefore, you will need to add the DCG using a Genesis hook. Bear in mind that the DCG must not be included within the Loop, so use something like genesis_before_loop, or equivalent hook.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
November 26, 2011
10:08 pm
colours 1
Member
Forum Posts: 5
Member Since:
November 26, 2011
Offline

Okay I've never used Genesis before, so I am using the genesis simple hooks plugin. So would I simply use the 'before loop hook' and paste in

<?php dynamic_content_gallery(); ?>

and then check the box for 'Execute PHP on this hook?'

November 26, 2011
10:36 pm
colours 1
Member
Forum Posts: 5
Member Since:
November 26, 2011
Offline

If not would I create a custom page template and add it to the child theme files via FTP. Is this what a page.php file is? I use the before loop hook, and it's done?

November 27, 2011
12:08 am
colours 1
Member
Forum Posts: 5
Member Since:
November 26, 2011
Offline

I have entered the DCG code into the before loop simple hook plugin, and made a mistake, do anybody know how to undo this??

November 28, 2011
6:52 pm
colours 1
Member
Forum Posts: 5
Member Since:
November 26, 2011
Offline

For those who read above. I did not use a static homepage, but used the widget for DCG. It now works fine, after I turned off all plugins to see which one was interfering.

November 28, 2011
9:29 pm
Ade
Admin
Forum Posts: 2493
Member Since:
August 25, 2008
Offline

Great! Thanks for posting back. Glad you got it fixed.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
Forum Timezone: UTC 1

Most Users Ever Online: 28

Currently Online: nloronacele
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

johnbroome: 13

speedyp: 12

sjpeaches: 12

CherylMcL: 10

gscorp: 8

lsnoei: 8

Member Stats:

Guest Posters: 770

Members: 1300

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 7

Topics: 980

Posts: 4299

Newest Members: jochris26, eva-aa, Tushar, chargers3, jwhetstone, robert

Moderators:

Administrators: Ade (2493)