Hi - I bought this really cool theme http://themeforest.net/item/calibra-premium-corporate-or-portfolio-theme/full_screen_preview/129878 but I want to replace the home page portfolio slider (which is showing the image slide show of "Featured Work") with the content from a page(preferred) or post.
here is a copy of index.php
I know that it has something to do with replacing the
<?php include (TEMPLATEPATH . "/lib/includes/portfolioSlider.php"); ?>
below, but I don't know that to replace it with to pull in x page or post.
Thanks!
<?php get_header(); ?>
<div id="article-content">
<?php if (get_option('phi_slideshow')== 'cycle'){
include (TEMPLATEPATH . "/lib/includes/slideshow.php");
}
elseif (get_option('phi_slideshow')== 'accordion'){
include (TEMPLATEPATH . "/lib/includes/accordion.php");
}
?>
<div id="pagetitle">
<?php
$querystr = "
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'phi_featured_page'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'page'
ORDER BY wposts.menu_order asc
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
featuredArticles($pageposts);
?>
<div id="featured-menu">
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Page Title Widget')){};?>
</div>
</div>
<?php $sidebarposition = get_option('phi_sidebarposition'); ?>
<div id="content" class="content-<?php echo $sidebarposition;?>">
<?php get_sidebar();?>
<div class="content-narrow contentwidth slider">
<?php include (TEMPLATEPATH . "/lib/includes/portfolioSlider.php"); ?>
</div>
</div>
</div>
</div>
<?php get_footer();?>
Nilesh shiragave answers:
you just want text content of the page or also you want title?
Chris John comments:
Nilesh - thanks for looking at it, but I wasn't getting responses so I found a solution elsewhere.
Thanks anyway...
Chris
Pali Madra answers:
Hi,
What is the type of content that you intend to pull in. Is it text, images or other media.
Once you have clarified I will be in a better position to give you the best option that you can use.
Ramsey answers:
Try this:
<?php
$post_id = 26;
$queried_post = get_post($post_id);
?>
<h2><?php echo $queried_post->post_title; ?></h2>
<?php echo $queried_post->post_content; ?>
Of course replacing the post_id with the post you're wanting to display. If you're wanting to grab page content try this:
<?php query_posts('page_id=1');
if (have_posts()) : ?>
<div>
<?php while (have_posts()) : the_post(); ?>
<?php echo the_content('Continue reading ยป'); endwhile; ?>
</div>
<?php endif; ?>