- This topic is empty.
-
AuthorPosts
-
May 16, 2009 at 11:06 pm #24862slgworksMember
Hello Everyone,
I am new to wordpress theme design and php, so please excuse me if this is rudimentary.
I am trying to setup a wordpress site that has a video archive page similar to the one on CSS-Tricks.
I have individual video pages created as a sub-page of the video archive page.
On the video archive page I have the individual video pages linked to dynamically using..Code:ID.’&echo=0′);
if ($children) { ?>Also on the individual video pages, I have a custom field setup called "thumb" that I place the URL of the post thumbnail in.
I would like to access the custom field info from the parent video page and have the image display in the list item of the dynamically generated links.In other words I would like to dynamically load all the images from the sub-page custom field on parent page.
I hope that this makes sense.
Any help is much appreciated.
May 17, 2009 at 2:03 am #57631AshtonSandersParticipantHi,
As far as I know, you can only echo the meta data from inside "the_loop"
This page has more info about Meta Data http://codex.wordpress.org/Using_Custom_Fields
May 19, 2009 at 5:32 pm #57821Chris CoyierKeymasterYeah that sounds about right. Perhaps you should do a well-executed query_posts() to get those child pages, so then you are inside the loop and have access to the page titles AND can grab that image that is a custom field.
May 21, 2009 at 7:39 pm #57929davesgonebananasMemberIf you only need a flat list of posts under the current page then simply using query_posts with a loop would be your best option. The only problem is if you have hierarchical pages, which would require nested lists, as that is a little more complicated to acheive and it is this that most of the magic inside wp_list_pages is dedicated to.
I think you could use the following (untested) code as a starting point:
Code:query_posts(“post_type=page&post_status=publish&post_parent=$post->ID&orderby=title&order=asc&showposts=-1”);
if (have_posts()) : while(have_posts()) : the_post();echo ‘
- ‘ . ‘ID) . ‘” title=”‘ . attribute_escape(apply_filters(‘the_title’, $post->post_title)) . ‘”>’ . ‘
‘;
endwhile; endif;
May 27, 2009 at 7:04 am #58248juliaxyzMemberHow do they do this magic trick? You know that magic trick were a woman walks behind lets say a piece of wood that a guy is holding, she stands behind it for like 2 seconds and then shes wering different clothes to the one before she went behind the piece of wood. Could you please help me?
____________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimatorMay 27, 2009 at 8:39 am #58250davesgonebananasMemberIt’s all done with smoke and mirrors.
May 28, 2009 at 3:12 am #58285AshtonSandersParticipantfor some reason, I always subconsciously add "bananas" to the first line of every one of your posts…
Code:It’s all done with smoke, bananas and mirrors.oh…. wait a minute… :lol:
May 28, 2009 at 10:17 am #58306davesgonebananasMembersmokey bananas… mmm delicious
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.