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
DCG for a single post - how to set it off, the php below in functions.php does not activate it
Status: closed
October 27, 2011
10:24 am
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi All,

I am using StudioPress with the child theme of Crystal.

I have used Dynamic Content Gallery (http://www.studiograsshopper.ch/) on the home page on a site with the Widget that comes with it.

The site is http://paaudiovisual.co.uk/.

The post where I want the gallery is http://paaudiovisual.co.uk/tv/panaso…1-winner/4338/

One that is part of five for the gallery is http://paaudiovisual.co.uk/tv/panaso…-p46gt30/4319/

Now on another site I want to use it on a specific post with 6 images.

The bit I can not get to work is how to tell DCG to run on a post and where it will show up.

I have the code here in functions.php:-

if( is_page('4338') ) {
dynamic_content_gallery();
}

4338 is a post not a page. Does that matter. Also the 5 posts with the DGC image url entered and the settings in DCG are set to ID method and the post IDs placed in the PAge/Post ID Number box.

Cheers,

John

October 27, 2011
10:51 am
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

John,

First, let's not confuse two things (a) the selection of posts or Pages featured in the DCG and (b) where the DCG is displayed.

Starting with (b), and just to be sure that I have understood your post, you have selected ID Method and you have specified 5 post ID's in the appropriate box in the gallery Method settings, and you have manually added an image URL in the DCG metabox for each of these 5 posts. Correct?

Moving on to (a): Ok, the conditional code you posted looks OK to me, but since you are using genesis, you must convert your code to a function and hook it to an appropriate Genesis hook. Please note that you cannot display the DCG within the Loop. Therefore, the Genesis hook used must be outside the Loop. The Studiopress dev pages should be able to guide you on which hook to use.

Hope this helps.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
October 27, 2011
9:38 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi Adew,

Sorry about that I was to much in a hurry.

I have all the images in the posts as image URL. I have added the code to the document hooks for before, then after then title. In each case nothing changed. I have the image id in the Page/Post ID numbers and used custom Image order. Plus a default image.

There seems to be still another change required?

Cheers,

John

October 28, 2011
7:53 am
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

John,

I think the before and after title hooks are within the Loop – you can't use those. Try using genesis before loop (it's in the Loop section of Simple Hooks, if that's what you are using). Please note – you can't display the DCG within the body of a post.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
October 28, 2011
3:23 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi Ade,

Thanks, I knew there was something else because the images had no information about where in the post they would go.

So, where can I find out how to get it to appear on the top right of the post (4338)?

Is it somewhere in this http://www.studiograsshopper.ch/dynamic-content-ga…..on-guide/?

Or where?

Cheers,

John

October 28, 2011
3:36 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

John,

Did you try the hook I mentioned? Genesis before loop.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
October 29, 2011
12:34 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi Ade,

Yes, it i in Loop Hooks – genesis_before_loop Hook.

This code:-

And Execute PHP ticked.

Now you said "Please note – you can't display the DCG within the body of a post.".

That makes sense because there is no place where I have said where on the post I want the Gallery to be.

I use Templates? Maybe edit one?

THe post appears with no DCG.

So what next?

Cheers,

John

October 29, 2011
3:29 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

John,

Can you post the code you are using in Simple Hooks?

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
October 29, 2011
7:48 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi Ale,

Sorry I meant to include it last time.

Here is the code:-

Do you want anything else?

On another site I added some to the home page and I set the same options in this one. Including the relevant URL in all the posts.

Cheers,

John

October 29, 2011
7:50 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline
10

Hi Ade,

This is the post

http://paaudiovisual.co.uk/tv/panasonic-what-hi-fi…..nner/4338/

Cheers,

John

October 30, 2011
12:06 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline
11

John,

Your code isn't displaying.

Copy your code into the reply, then highlight it and click the code button in the reply box toolbar.

Thanks.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
October 30, 2011
6:14 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline
12

Hi Ade,

Thanks

<?php if( is_page('4338') ) {
dynamic_content_gallery();
} ?>

Then ticked execute php in the hook.

Cheers,

John

November 2, 2011
4:59 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline
13

Hi Ade,

It seems I will have to try elsewhere for further help. Are you still there?

Cheers,

John

November 2, 2011
5:29 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline
14

Yes, I'm here, John. This is a free support forum – so I answer when I can…

Your code looks fine. The only way to get this resolved is for me to login to your admin and check all your settings. If you're happy to do that, please send me an admin login and password.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
November 3, 2011
5:06 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline

Hi Ade,

Changing it to

<?php if( is_single('4338') ) {
dynamic_content_gallery();
} ?>

Gets it further but still not there. The code loads but they are on not all in one place.

See link

http://paaudiovisual.co.uk/tv/panasonic-what-hi-fi…..nner/4338/

Plus there are two instances of every image.

Logon at [Details removed by Admin. Never post login details on a public site.]
Cheers,

John

November 3, 2011
5:43 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline
16

Ok, John, I'll take a look this evening.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
November 4, 2011
1:10 am
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline
17

John,

DCG is working now.

DCG Settings > Load Scripts wasn't set up correctly. "4338" is a POST not a PAGE, so entering this page number in the load scripts results in no scripts being loaded as page 4338 doesn't exist. To fix this, I've changed the Load Scripts options to "Other". Bear in mind that this isn't ideal as it means that the DCG's scripts are loaded for every page on your site… You are also more likely to get javascript conflicts with other plugins, too.

My advice is not to use the DCG within a post like this as it's designed to be used on the home page, to entice your readers to read your articles.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
November 4, 2011
12:06 pm
johnbroome
Member
Forum Posts: 13
Member Since:
October 19, 2011
Offline
18

Hi Ade,

THis is very good, thans. OK I have an idea, is there a way to use DCG on the home page and on another page. I can move the content from the post I am using at the moment to a page. And put the current home page image gallery into DCG and stop using wp-cycle.

Cheers,

John

November 4, 2011
1:12 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline
19

Great! Can we consider this one closed now? Thanks.

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

Most Users Ever Online: 28

Currently Online: theonsale, nloronacele
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

johnbroome: 13

sjpeaches: 12

speedyp: 12

CherylMcL: 10

littlemerry: 8

lsnoei: 8

Member Stats:

Guest Posters: 770

Members: 1297

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 7

Topics: 978

Posts: 4293

Newest Members: chargers3, jwhetstone, robert, Mak-Donuts, kilerb, Marian Bamboi

Moderators:

Administrators: Ade (2490)