downfast
Forum Replies Created
-
Forum: Themes and Templates
In reply to: image replacement for menu item?yes they are pages.
Custom field? This is interesting; i have just used custom fields for another project, I dind’t know i could use them to generate css for menu links as well; how would u do that?Forum: Themes and Templates
In reply to: Same resolution for all computersliquid layout:
Forum: Fixing WordPress
In reply to: get first attachment from a sub pagedone..
<?php $args = array( 'post_type' => 'attachment', 'post_parent' => $page->ID, 'numberposts' => 1, ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo the_attachment_link($attachment->ID, false); } } ?>
Forum: Fixing WordPress
In reply to: get first attachment from a sub pageany one please?
Forum: Fixing WordPress
In reply to: Insert code in a loop of subpageserr yeah..thanks
I am using a plugin which works just fine; all i need to do is to be able to run it via the loop i am using to diplay the other information e.g the metabasically something like:
<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID); foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; ?> <li cass="thumbList" > <a>ID) ?>" class="clearfix" ><h1 class="title"> <?php echo $page->post_title ?> </h1> <?php get_the_image(); ?> <?php $key_1_value = get_post_meta($page->ID, 'Preview', true); print $key_1_value; ?></a> <?php }
Any idea?
Forum: Fixing WordPress
In reply to: how to only get the image from a sub page?I have found a solution and it works perfectly but i would like to understand why it only displays the image and not the text, it is actually what i wanted, but why does it do this?
this is the code i am using now:
<ul class="thumb"> <?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID); $count = 0; foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; $count++; ?> <li cass="thumbList" > <a href="<?php echo get_page_link($page->ID) ?>"><h1 class="title"> <?php echo $page->post_title ?> </h1> <?php echo apply_filters('the_content', $post->post_content); ?> <?php $key_1_value = get_post_meta($page->ID, 'Preview', true); print $key_1_value; ?> </a> </li> <?php } ?> </ul>
Forum: Fixing WordPress
In reply to: get the informartion form the_meta of a sub pagethat’s it! that is exactly what I was looking for.
yes it had more custom fields, but i wanted to only target one of them, basically i am building a page with thumbs of the sub pages and i needed to get part on the info in each thumb.Anyway..thanks a lot! ??
Forum: Fixing WordPress
In reply to: get the informartion form the_meta of a sub pagehey thanks a lot, i think it’s getting closer but not quite there yet..
it is now getting the “low season” which is the name of my custom field, but also displaying other info..
Low season : Array
_edit_lock : Array
_edit_last : Array
mf_page_type : Array
_wp_page_template : Array
_cspc-page-transitions : ArrayForum: Fixing WordPress
In reply to: get the informartion form the_meta of a sub pagethanks but i get this:
Warning: Invalid argument supplied for foreach() in C:\wamp\www\mandc\wp-content\themes\mandc\thumb.php on line 24
where line 24 is where i have inserted that code (just before the closing div).. any idea?
Forum: Fixing WordPress
In reply to: get the informartion form the_meta of a sub pagewhoops…forgot to add the code tags
<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID); $count = 0; foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; if($count >= 2) break; $count++; ?> <div class="thumb"> ID) ?>"><h1 class="title"> <?php echo $page->post_title ?> </h1> <?php echo $page->post_content ?> </div>
Forum: Fixing WordPress
In reply to: tag to call only subpagesthe solution i have taken was to set display:none in the first sub ul it creates within the main page sul; this si fine as now it only shows the ul i want, but it is not accesible not a good mark up
Forum: Fixing WordPress
In reply to: tag to call only subpagesi have tried them. but what they do is create a duplicate of the sub pages, one in the the main pages ul and another below. Basicaly they duplicate the sub pages into 2 different position.
What happens is the when i try each of the codes given as an example, it echoes to me teice the sub pages, one in the main menu and one in another div.
<ul class=”menu”>
<?php if (function_exists(‘wswwpx_fold_page_list’)) : ?>
<?php wswwpx_fold_page_list(‘sort_column=menu_order&title_li=’); ?>
<?php else : ?>
<?php wp_list_pages(); ?>
<?php endif; ?>
<?php echo $children; ?>
</div>
this will give me a list of the main menu with a sub menu displayed below the main page which has a sub page..but below the ul it will repeat the sub page once again for some reason; i did try all the solution there; it just seem to repreat the sub page echo for some reason.. i need to be able to place the WHATEVER SECOND ( OR IN FUTRE THIRD) below the main ul
Forum: Fixing WordPress
In reply to: tag to call only subpagesthank you
idially i would like to only add : <?php echo $children; ?>
but
this is my mark up:
<ul class=”menu”>
<?php if (function_exists(‘wswwpx_fold_page_list’)) : ?>
<?php wswwpx_fold_page_list(‘sort_column=menu_order&title_li=’); ?>
<?php else : ?>
<?php wp_list_pages(); ?>
<?php endif; ?>
<?php echo $children; ?>
—
the sub pages e.g. <?php echo $children; ?>
come up to be within the ul of the main pages even tho i put it put site the main ul tag; basically i need to have the sub page display in another diver below the main one with a scroll bar
any help please?