Show preview posts and pages to clients
Password-protect and publish the page and send your client the password.
Password-protect and publish the page and send your client the password.
I found a nice way to do this using the preview_post_link filter, which allows you to rewrite the URL used by the preview operation. In my case I did something like: add_filter( ‘preview_post_link’, function ( $link ) { return ‘http://domain.com/mobile-preview/?src=”https://wordpress.stackexchange.com/questions/191918/. urlencode($link) .”%26admin_bar=false’; } ); When I click my preview button WordPress opens up my custom … Read more
The code you provided works as expected on a fresh install of WordPress (4.3.1 in this case). The ideas below shouldn’t be considered an answer, so much as a checklist to aid in debugging the issue by narrowing the scope of the problem: You’ll need to be logged in as a user with permission to … Read more
Yes. You can bind to the change event on the entire Setting collection (wp.customize) as follows: wp.customize.bind( ‘change’, function ( setting ) { if ( 0 === setting.id.indexOf( ‘my_settings[‘ ) ) { doSomethingWithSettingValue( setting.get() ); } });
I had a colleague take a look at the entire plugin code and he found a function I had written which was forcing the query to only show ‘Published’ posts. This was interfering with the preview as it was being treated as a front-end query. I was able to bypass it by adding the parameter … Read more
I run through exact same issue. Later I come to know that custom post type I created was not public and hence it does not have ‘Preview Changes’ button visible. Prior version of WordPress was displaying that button but it seems they have fixed it now. To fix it, make sure you set ‘public‘ to … Read more
luke reports that this issue has been resolved in the comments of the original question: Thanks guys. Updating to 3.8.1 solved the problem. There were some problems with “dead zones” in buttons.
This might help you. Add this script to functions.php. It will unset author from oembed preview. Remember Discord might already cached your URL. You may not get immediate result. add_filter( ‘oembed_response_data’, ‘disable_embeds_filter_oembed_response_data_’ ); function disable_embeds_filter_oembed_response_data_( $data ) { unset($data[‘author_url’]); unset($data[‘author_name’]); return $data; } for more explanation head over here
Please replace $post_type with your post_type in question, e.g. post, page, cpt_slug,… The function echoing the meta box with the preview button is called post_submit_meta_box. The condition to show the button is set with the function is_post_type_viewable. Following that: If the {$post_type}s flags publicly_queryable or _builtin and public are set to true the preview button … Read more
Look somewhere after the “Loop” starts (it starts with <?php while( have_posts() ): the_post(); ?>) in your index.php file. Find <?php the_content(); ?> and change it to <?php the_excerpt(); ?>. If you don’t want any content, just remove the_content() all together. If you’re using a theme from wordpress.org, it would best to do this in … Read more