Okay
  Public Ticket #2120657
Custom post type duplicate content
Closed

Comments

  • paul started the conversation

    Hi, The Sonaar theme is well advertised and linked with Elementor.

    I have created a Custom Post Type called 'Church Members'.

    I created the Elementor Theme Builder SINGLE page template, 'Church Members single'.

    When the Single page is displayed, it displays the CONTENT exactly where I created the Dynamic Content block, but it also shows again at the bottom of the content page, where I have NOT included any content fields???

    I don't know if this is something to do with the single.php template, or something else?

    It worked ok when I created a SINGLE template for the PODCASTS, but I see that there is a seperate php file for that. (single-podcast.php)

    Do you know why this is happening and how I can fix it?

  • paul replied

    It looks like it may have something to do with the single.php file:

    <?php

                        if ( function_exists( 'elementor_theme_do_location') && (get_post_type( get_the_ID() ) !== 'block' ) ) {
                         elementor_theme_do_location( 'single' );
                         the_content();
                        }else{
                         the_content();
                        }

                    ?>

    I REMOVED the 2x the_content and the EXTRA content is solved.

    the_content();
                        }else{
                         the_content();
                        }

    *** However, I'm not sure this is completely the correct way to solve this issue.....?

    I thought that when I created a NEW SINGLE template, it would let me create the custom template to contain only the content that I want to include...?

    I have Elementor Pro by the way.

    Thanks


  •  1,114
    Max replied

    You probably need to create your own single php file for your custom post type you have created. Not sure exactly what you did.

    Unfortunately, implementing custom post with your own single page is beyond the scope of our support.

    Thanks,


    Max from the Sonaar.io Crew

  •  1,114
    Max replied

    For custom works, we strongly recommend these guys: WP Kraken - https://sonaar.io/go/wpkraken

    It's cheap! And the cool thing is that if you are not satisfied with their service Seanlai, or they don't meet your guidelines, you will get your money back ! It's 100% guaranteed.

    Thanks,


    Max from the Sonaar.io Crew

  • paul replied

    Hi Maxime, I actually think that this is 'within' the scope of your theme support. This is why:

    I have installed ASTRA and the HELLO (Elementor) Themes to test. These two, plus the WordPress Twenty Nineteen DO NOT duplicate the Content part. Sonaar theme DOES duplicate the_content  ???

    I can see that SONAAR have created the SINGLE.PHP file in the theme as you have your custom tags (Iron_sonaar) throughout the code.

    This is why I believe something is not quite right with this file, considering it is meant to work well with Elementor Pro.
    All I am doing is creating a SINGLE page template in the Elementor Theme Builder. Very straight forward.

    When I add text to the page edit Content area and then specify in the page builder exactly where i would like it to appear, it them duplicates the_content at the bottom of the page as well. ???

    Please could you investigate further as I think that it is a fundamental issue with the theme and Elementor, considering the other vanilla themes do not have the error/issue. See screenshot.

    Thanks, Paul

  •  1,114
    Max replied

    Hi Paul,


    thanks for pushing this. This allowed us to resolve an issue that we were not aware of.

    I've not tested it much yet, but here a new file to replace your single.php

    If everything goes well, this fix will be part of the next theme update as well.

    Please replace single.php by the one attached (you will need to uncompress the single.zip file on your computer first).

    Thanks,


    Max from the Sonaar.io Crew

  • paul replied

    Hi Maxime, thanks for your time looking into this again for me.

    The new single.php does indeed solve the issue and I hope it helps others too. It may also save you future support tickets!!!

    Cheers,
    Paul

  •  1,114
    Max replied

    Have a nice day

    Thanks,


    Max from the Sonaar.io Crew