Tagged: ,

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1408053

    Hey Guys,
    I’ve tried some duplicate content plugins (I think they are quite handy for Editors). I’ve tried Duplicate Page and Yoast Duplicate Post. With both plugins I run in the same problem. I have a page with some manually styled elements (e.g. an Accordion with a custom background color, and a 1/3 column with custom padding / background). If I duplicate that page via one of the plugins, the custom formatting is taken over to the duplicate. But as soon as the duplicated page is published, the custom formatting in the frontend gets lost on the original page. On the original page in the ALB the custom formatting is still visible, and if I save again everything is good in the frontend as well. However this is something thats hard to explain to editors. I know I can save a page and/or elements as templates in the ALB. However they are all shared by all editors, on more complex pages the list of templates in the ALB gets quite long and some of the stuff is maybe not really relevant for all editors. Therefore duplicate pages / posts is quite useful. Is there a way to duplicate pages/posts with customized ALB elements without saving the original page/post again?

    Best wishes,
    Martin

    #1408362

    Hi Martin,

    I tried to install and activate Duplicate Page by mndpsingh287 https://wordpress.org/plugins/duplicate-page/ and it seems to work properly.
    I tried to create an accordion with custom background color, font color, font sizes, also added 1/3 column with custom padding and background image as you have mentioned.
    If that does not help, can you create a staging site? so we can try to inspect further.

    Best regards,
    Nikko

    #1408453

    Hi Nikko,

    Great thanks for checking.

    You can login to my staging site (debug mode enabled, most plugins are deactivated, Duplicate Page Plugin is activated) under.
    [moved to private content]

    If you duplicate under Pages for example the Subpage and afterwards publish the duplicate. The original page (eventually with a hard reload) it looks like this (as an example). Sometimes it works (maybe one out of five tries) but in most tries the custom adjustments from the ALB went missing ( I’m using Firefox, although I doubt that this has an impact).

    Original Page (still looks like this if the duplicate is not published but exists as a draft)
    Original Page

    Original Page after the duplicate is published
    Original Page after duplicate is published

    Thanks for checking,
    Cheers,
    Martin

    • This reply was modified 1 year, 6 months ago by Nikko.
    #1408514

    Hi Martin,

    Thanks for giving us admin access.
    I tried to duplicate the subpage and it seems to be working well, I have posted in private content the duplicates.
    And it seems to be working properly.

    Best regards,
    Nikko

    #1409132
    This reply has been marked as private.
    #1409206

    Hi Martin,

    I have actually duplicated it from a published page.
    It is the page I posted in private content as the Base page in my last reply.

    Best regards,
    Nikko

    #1409409
    This reply has been marked as private.
    #1409521

    Hi Martin,

    I have duplicated the page and published it, links in private content.

    Best regards,
    Nikko

    #1409524
    This reply has been marked as private.
    #1409528

    Hi Martin,

    I have checked on the issue and it seems post-css file returned a 404 (file not found), the backend had no issue and the information was intact except for the file used for styling was missing. I have re-updated the page which seems to have fixed the issue as it regenerates the CSS file.

    Best regards,
    Nikko

    #1409532
    This reply has been marked as private.
    #1409845

    Hi Martin,

    I have added this code in your functions.php (child theme) to disable post-css file:

    function custom_avf_post_css_create_file( $create ) {
    	return false;
    }
    
    add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );

    Please try to check if the issue will still persist.

    Best regards,
    Nikko

    #1410155

    Hi Nikko,

    Perfect, thanks for adding the code to the functions.php. Seems to work (I can now duplicate pages and posts and the original with custom styles remains). Are there any downsides if the post-css file is disabled?

    Cheers,
    Martin

    #1410185

    Hi,
    Glad Nikko was able to help, your site should not experience any issue with post-css disabled, shall we close this then?

    Best regards,
    Mike

    #1410211

    For others using a duplicate page / post plugin. In my case the solution is to disable the post-css file with following code in the functions.php of your child theme:

    function custom_avf_post_css_create_file( $create ) {
    return false;
    }

    add_filter( ‘avf_post_css_create_file’, ‘custom_avf_post_css_create_file’, 10, 1 );

    Cheers,
    Martin

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘ALB element custom styling lost with duplicate plugins’ is closed to new replies.