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
Static Front Page Only
Status: fixed
December 6, 2010
11:35 pm
mkane
Guest

Hi:

following your advice here : http://www.studiograsshopper.ch/forum/dynamic-cont…..how/#p2436

I've implemented the code into my functions.php file. Problem is the gallery shows fine on the front page AND on EVERY page / post on the site as well. Obviously not the desired outcome. What did I go wrong ? :)

theme : Genesis ( Lifestyle – child )

DCG Settings:

Load scripts ; Home page only ( Also, select this option if you use a Static Front Page defined in Dashboard > Settings > Reading and the gallery will only be shown on the home page.)

December 6, 2010
11:43 pm
Ade
Admin
Forum Posts: 2497
Member Since:
August 25, 2008
Offline

Can you post the code that you have placed in functions.php?

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
December 6, 2010
11:46 pm
mkane
Guest

sure – sorry for that – "loop" gave me the best position- but it might also be the culprit :)

function load_dcg() {
if( is_front_page() ) {
dynamic_content_gallery();
}
}
add_action('genesis_before_loop', 'load_dcg');
}
December 7, 2010
12:20 am
Ade
Admin
Forum Posts: 2497
Member Since:
August 25, 2008
Offline

That will work – but there shouldn't be a closing bracket after the add_action line. In other words, the add_action should be outside the function, not inside it.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
December 7, 2010
12:33 am
mkane
Guest

leaving it off gives me :

Parse error: syntax error, unexpected $end in /home/xxx/wp-content/themes/lifestyle/functions.php on line 96
December 7, 2010
8:47 am
Ade
Admin
Forum Posts: 2497
Member Since:
August 25, 2008
Offline

I think you misunderstood what I was trying to say. This is the code you should use in functions.php:

function load_dcg() {
if( is_front_page() ) {
dynamic_content_gallery();
}
}
add_action('genesis_before_loop', 'load_dcg');
Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
Forum Timezone: UTC 1

Most Users Ever Online: 28

Currently Online:
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: 4303

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

Moderators:

Administrators: Ade (2497)