Hi
I would like to switch the position of the 2 sections (Partial Project List and Selected Projects) on this page:
http://ifyoumakeeverythingboldnothingisbold.com/einhorn/?page_id=19 so that the "Selected Projects" are on the top followed by the "Partial Project List".
Below is the page template php file:
https://www.dropbox.com/s/xy3vs5ikookxlup/page-portfolio.php
Fahad Murtaza answers:
can't find an attachment.
karenmessing comments:
Sorry. Try this:
https://www.dropbox.com/s/xy3vs5ikookxlup/page-portfolio.php
Fahad Murtaza comments:
OK, I am on it.
Fahad Murtaza comments:
ok, here it is
Fahad Murtaza comments:
https://www.dropbox.com/s/jlhzoa2negumzh2/page-portfolio.php
karenmessing comments:
Didnt work. Here is the result:
http://ifyoumakeeverythingboldnothingisbold.com/einhorn/?page_id=19
Fahad Murtaza comments:
I can look into it. Please give me wordpress access if you can. Can fix it in a few minutes. You can send it as a private message.
karenmessing comments:
Alright. How do I do that?
Fahad Murtaza comments:
OK
Please check if its the way you want it to be
http://ifyoumakeeverythingboldnothingisbold.com/einhorn/?page_id=19
Hariprasad Vijayan answers:
Hello,
Can you please show the php file's code?
karenmessing comments:
Sure. Try this:
https://www.dropbox.com/s/xy3vs5ikookxlup/page-portfolio.php
Hariprasad Vijayan comments:
Try This,
<?php /*
Template Name: Portfolio
*/
?>
<?php global $is_portfolio; $is_portfolio = true; ?>
<?php get_header(); ?>
<?php if(!is_front_page()):?>
<div class="wrap">
<div class="middle clearfix">
<?php $page_description = get_post_meta($post->ID, "_ttrust_page_description", true); ?>
<?php if ($page_description) : ?>
<p><?php echo $page_description; ?></p>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php $p = (is_front_page()) ? $page : $paged; ?>
<div id="content" class="clearfix full">
<div id="selectprojects" class="clearfix cItems">
<div id="pageHead"></div>
<h1>Selected Projects</h1>
<?php $page_skills = get_post_meta($post->ID, "_ttrust_portfolio_skills", true); ?>
<?php $projects_per_page = of_get_option('ttrust_projects_per_page'); ?>
<?php if ($page_skills) : // if there are a limited number of skills set ?>
<?php
$skill_slugs = ""; $skills = explode(",", $page_skills);
foreach ($skills as $skill) {
$skill = get_term_by( 'slug', trim(htmlentities($skill)), 'skill');
if($skill) {
$skill_slug = $skill->slug;
$skill_slugs .= $skill_slug . ",";
}
}
$skill_slugs = substr($skill_slugs, 0, strlen($skill_slugs)-1);
?>
<?php query_posts( 'skill='.$skill_slugs.'&post_type=project&posts_per_page='.$projects_per_page.'&paged='.$p ); ?>
<?php else: ?>
<?php query_posts( 'post_type=project&posts_per_page='.$projects_per_page.'&paged='.$p ); ?>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$project_repeat_bkg = get_post_meta($post->ID, "_ttrust_project_repeat_background", true);
$project_bkg_is_dark = get_post_meta($post->ID, "_ttrust_project_bkg_is_dark", true);
$project_description = get_post_meta($post->ID, "_ttrust_project_description", true);
$project_head_alignment = get_post_meta($post->ID, "_ttrust_project_head_alignment", true);
$project_background_color = get_post_meta($post->ID, "_ttrust_project_background_color", true);
$project_background_img = wp_get_attachment_image_src(get_post_meta($post->ID, "_ttrust_project_background_image", true), 'full');
$project_background_img = $project_background_img[0];
$p_styles = "";
$p_class = "";
if($project_background_img){
$p_styles .= "background-image: url(".$project_background_img.");";
}
if(!$project_repeat_bkg){
$p_styles .= "background-repeat: no-repeat;";
$p_styles .= "background-position: center center;";
$p_styles .= "background-size: cover;";
}
if($project_background_color){
$p_styles .= "background-color: ".$project_background_color.";";
}
if($project_bkg_is_dark){
$p_class .= "darkBkg ";
}
$p_class .= $project_head_alignment;
?>
<div <?php post_class($p_class); ?> id="project-<?php echo $post->post_name;?>" style="<?php echo $p_styles;?>">
<div class="project-thumb"> <span class="sep"></span>
<div class="head">
<?php if(of_get_option('ttrust_link_projects')) : ?>
<div class="project small <?php echo $p; ?>" id="project-<?php echo $post->ID; ?>">
<div class="inside"> <a href="<?php the_permalink(); ?>" rel="bookmark" >
<?php the_post_thumbnail("ttrust_one_third_cropped", array('class' => 'fade', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?>
<br/>
<span class="title"><span>
<?php the_title(); ?>
</span></span> </a> </div>
<!-- inside -->
</div>
<!-- project thumb -->
<!--
<h1><a href="<?php the_permalink() ?>" rel="bookmark" ><?php the_title(); ?></a></h1>
<?php else: ?>
<h2><?php the_title(); ?></h2>
<?php endif; ?>
<!-- <div class="description"><p><?php echo $project_description; ?></p></div>
-->
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<!--End-->
<?php while (have_posts()) : the_post(); ?>
<div id="partialprojects" class="clearfix cItems">
<div id="pageHead"></div>
<h1>Partial Project List</h1>
<?php the_content(); ?>
<?php endwhile; ?>
</div>
<!-- partial projects -->
<?php global $total_pages; $total_pages = ceil($wp_query->found_posts/$projects_per_page); ?>
<?php $paged = $p; ?>
<?php get_template_part( 'part-pagination'); ?>
</div>
</div>
<!-- selected projects -->
</div>
<!-- clearfix -->
</div>
<!-- wrap -->
<?php get_footer(); ?>
karenmessing comments:
Didnt work either: http://ifyoumakeeverythingboldnothingisbold.com/einhorn/?page_id=19
Hariprasad Vijayan comments:
Which wordpress page content that you need to display under "Partial Project List" section?
Navjot Singh answers:
Send me your login and ftp details via this page ( http://www.wpquestions.com/user/profile/id/939 ) - use Send message option.
Navjot Singh comments:
Try this
https://dl.dropboxusercontent.com/u/70553/page-portfolio.php
Arnav Joy answers:
yo can also write following jquery
<script>
jQuery(document).ready(function($){
div1 = $('#partialprojects');
div2 = $('#selectprojects');
tdiv1 = div1.clone();
tdiv2 = div2.clone();
if(!div2.is(':empty')){
div1.replaceWith(tdiv2);
div2.replaceWith(tdiv1);
tdiv1.addClass("replaced");
}
});
</script>