portfolio_item preview doesn't work

  • Member
    February 23, 2017 at 8:01 pm #31066

    Hi there.

    I’m not sure this issue is related with your theme, but if I switch to WP default theme there is not any Portfolio to check…
    If I deactivate the plugins the error is still there.

    The issue is this:
    When creating a new portfolio item or editing a draft of it the preview function works fine. If you change the portfolio item from published to draft and save it the preview function works again.

    But as long as the post status is “published” the portfolio item preview give me an error 404.

    In the past, when I created my website, I changed the word “Portfolio” to “Outdoor”, as you can see in the code below:

    add_action('init', 'boc_custom_types');
    function boc_custom_types() {
    			'labels' => array(
    				'name' => 'Portfolio',
    				'singular_name' => 'Portfolio'
    			'public' => true,
    			'has_archive' => true,
    			'rewrite' => array('slug' => 'outdoor'),
    			'supports' => array('title', 'editor', 'thumbnail'),
    			'can_export' => true,
    			'show_in_nav_menus' => true,

    An example: I saw that the 404 page take me to this URL:


    I realize that if I deleted all the letters after preview_id=xxx the preview works fine (https://www.guidedolomiti.com/outdoor/arrampicata-su-roccia/?preview_id=22521)

    Have you any idea about how to solve this?
    Thank you.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.