Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 136619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:58:37+00:00 2026-05-11T06:58:37+00:00

I’ve done a lot of small projects on the side lately where the client

  • 0

I’ve done a lot of small projects on the side lately where the client wants a good chunk of the website to stay the same, they just want to be able to edit particular ‘areas’ of the site. Namely, some text in some box somewhere.

I’ve found that WordPress works for this pretty well. The interface is nice and friendly to use, and it’s got lots of work behind it so I don’t have to reinvent wheels, fix bugs, etc.

So what I wind up doing is making PHP pages which look like what the client wants, then making the content editable areas contain a particular post or page, which is what is editable in WordPress.

I’m having the particular page’s contents displayed on the page using code like this

<?php echo apply_filters('the_content', $page_Contact->post_content); ?> 

where $page_Contact is a variable defined elsewhere.

However, the ‘Preview’ or ‘View Page’/’View Post’ function on each page/post goes to the logical WordPress location and this is not the effect I want in this case.

So for example I have pages like this

www.site.com/index.php www.site.com/about.php www.site.com/contact.php 

And so forth.

WordPress wants to have the ‘View Page’ and ‘Preview Changes’ links go places like

www.site.com/?page_id=2 www.site.com/?page_id=8&preview=true&preview_id=8&preview_nonce=45522671f5 

Which is a problem because, in the permalink structure above, both of those go to the index.php page which, except for the page I’m using to structure index.php, it’s not where I want the user/editor to go. And none of the cases above allow any sort of preview (which is a concession I’m willing to make given how I’m doing this)

Is there a way, preferably using a plugin to rig WordPress such that the preview for a page in the dashboard goes to a preview of the non-index.php page where the content will be housed? So for example the link for the ‘Contact’ page in WordPress’s dashboard goes to contact.php instead of ?page_id=2? This is a deal where I’m trying to get this done in the editing interface and I’m not concerned about the links in the site itself.

Obviously I would need to maintain this per-page and this would be a situation where new pages don’t go up unless I put them there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:58:38+00:00Added an answer on May 11, 2026 at 6:58 am

    Take a look at the preview_post_link hook in WordPress — it should be called when generating that link, and you can use that in conjunction with a custom field (or some logic) in order to construct whatever preview link you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have an array which has BIG numbers and small numbers in it. I
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am using Paperclip to handle profile photo uploads in my app. They upload
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.