Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Page in two place WordPress

  • SOLVED

Hi,

I am looking for a way to have a Page (not a Post) live in two separate areas of a Website.

The case is this:

A client has a page describing an expert solution (in the Expert Solution area). But it is also needs to go in the Problems We Solve area.

I was thinking of using Redirection, but I don't think that will allow me to put in both menu areas and it will affect the breadcrumbs.

Are there other, better solutions?

Thanks,
Josh

Answers (4)

2010-07-29

Pippin Williamson answers:

Create two pages, one in each place. Then create a page template for use on the second and use a custom query to pull the content from the first page.


Josh Fialkoff comments:

So this new template (i.e, Problems and Experts) would be used in the Problems area?

It would not satisfy the problem of having duplicate content tho right?


Pippin Williamson comments:

Actually, it does solve the problem of duplicate content because the second pages content (the one with the custom template) pulls all of its content from the first page. When you update the first page, the second is automatically updated as well.

What I am suggesting is the exact same thing as West Coast Design has said.


Josh Fialkoff comments:

Thanks.

I realize you are both suggesting the same thing.

My point about dup content is this:

/problems/pageA

and

/expert/pageA

are going to have the same content, so Google will not be happy.

Right, or am I missing something?


Pippin Williamson comments:

If you don't want duplicate content, then you will have to use redirection.

2010-07-29

West Coast Design Co. answers:

Josh,

Could you create page A, add text the page A, create page B, then code a custom theme file that queries A content?

Permalinks, breadcrumbs are fine … only have to edit 1 page.


Josh Fialkoff comments:

You would still have two URLs with the same content tho, right?


West Coast Design Co. comments:

Yes

<?php /* Template Name: Custom Page Name */ ?>

<?php include (TEMPLATEPATH . '/includes/header.php'); ?>

<!-- Just replace page_id=55 with ID of page -->
<?php $my_query = new WP_Query("showposts=1&post_type=page&page_id=55"); while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>

<?php the_title(); ?>

<?php the_content('Read the rest of this entry &raquo;'); ?>

<?php endwhile; ?>

<?php include (TEMPLATEPATH . '/includes/footer.php'); ?>


West Coast Design Co. comments:

FYI

To find the Page ID, go to Pages->Edit and hover over the title of the page. The status bar of your browser will display a URL with a numeric ID at the end. This is the page ID.


West Coast Design Co. comments:

Oh … then use a plugin called robots meta to no follow one of the two pages.
http://wcdco.info/aa

2010-07-29

wjm answers:

This is as simple as it can get.

create a template with the following code:

<?php
/*
* Template Name: Solutions
*/
global $posts;
$page_id = 2;
$posts = get_pages( $page_id );
require('single.php');
?>


save it as solutions.php and place it in your theme folder.
create the mirror page, and under the Page Attributes,
set "Solutions" as the Template

you only need to set in solutions.php
$page_id = 2;
which will be the page_id of the page you are mirroring.
and modify
require('single.php');
to whatever your page template is. it could be page.php
i dont know what theme you are using.
these are the settings for the default theme (twenty-ten).

let me know if you need anything else.
-wjm


Josh Fialkoff comments:

Will this address the duplicate content issue?


wjm comments:

you only update one page.
but both pages are indexed as separate by search engines

2010-07-29

Chris Lee answers:

I recommend using a sidebar widget to pull from a particular page using the Query_posts widget:
[[LINK href="http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin"]]http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin[[/LINK]]

Then just add that additional sidebar to the particular page using the widget context plugin:

[[LINK href="http://konstruktors.com/projects/wordpress-plugins/widget-context/"]]http://konstruktors.com/projects/wordpress-plugins/widget-context/[[/LINK]]

This allows sidebar widgets to show up on only certain pages.

That'd be a lot easier and barely any coding is involved.