Articles of previews

After Migration, images show up on a preview of the page but not the actual page

I’m helping out with a website that got a little bit broken when they changed hosts. The images stopped working for some parts of the website, so I am going through and trying to fix them. I somehow managed to fix them in a way that it works when I preview the changes to the […]

Add unique id to Preview URL

Is there an easy way to append a unique ID to the preview URL when the preview button is clicked by a user? So this: http://example.com/news/1/title/?preview=true Becomes: http://example.com/news/1/title/?preview=true&v={unique_id} I ask because our setup caches heavily on the server-side so when updating it takes a while for the changes to show up in the preview. Manually […]

preview_post_link for Custom Post Types

I’ve got a custom post type, and I’d like to be able to change the preview link but from what I can tell, the hook for preview_post_link only affects the default post type. Any guidance? Here’s what I’ve been trying. add_filter( ‘preview_post_link’, ‘append_preview_query_vars’ ); function append_preview_query_vars( $link, $post ) { if( $post->post_type === “2016program” ) […]

How to track wordpress sub folders html page in google ananlytics

in wordpress site i created one one folder & put some html files(www.mywebsite.com/global/page.html). But google analytics is not tracking those html pages(www.mywebsite.com/global/page.html). Is there any solution to track those pages likewise the wordpress pages. Your feedback will be highly appreciated. THANKS.

What program can I use to preview my wordpress site?

Apologies if this is the wrong site to be asking this, but I just downloaded a template for a website that I want to customise. On my Mac I have a program called Espresso which allows me to ‘preview’ any website that contains any mix of client-side and server-side files. Is there an equivalent on […]

Enable commenting on front-end preview page for pending posts

We are in the process of allowing authors to collaboratively be a part of the editorial process. They will have access to all pending posts‘ preview pages (not post-edit pages). I want to allow these users to post a normal comment whenever the post is in pending post_status. Upon research, a comprehensive solution has been […]

Theme Live Preview on Front End?

I have a membership site where a member will fill out a form (FormidablePro, if that matters). This form contains information that will be the content on a site which will be created once the form is submitted automatically (how that happens isn’t my question). Here’s the question: On the form, a list of possible […]

How to allow potential clients to preview a theme

I have several themes installed in a WordPress network. New clients will receive a network sub-site. I’d like them to be able to preview the available themes that are installed in WordPress. There are a handful of plugins that claim to allow this to happen, but none of them have been updated in the last […]

After changing wp from subdirectory to root I can't preview any changes to a page or post

I followed the guideline from WP Codex. Changed the site url in general settings Copied the .haccess and the index.php files from the subdirectory to the root Edited the root index.php (new copied file in root) from: ‘/wp-blog-header.php’ ); to ‘/subdirectory/wp-blog-header.php’ ); checked the permalink structure. the following code is in the new copied root […]

Which ID does WordPress actually use to display published/drafted posts in preview mode?

I can identify if in preview mode or not easily by calling is_preview(). I can also get the id of the post being previewed by calling get_the_ID(). The return value of the get_the_ID() is not consistent and here is where I seek for advice. If the post has not been published yet, the ID returned […]