Support » Plugin: Custom post types » Fix for Blocksy theme

  • Resolved nimmalareddy

    (@nimmalareddy)


    It has copied the single template to custom templates folder but it did not add the necessary line

    <?php custom_post_types_get_custom_template(); ?>

    to it.
    I’ve added it myself (within SECTION tags of the copied template) and it’s working great.

    			<section>
    				<?php custom_post_types_get_custom_template(); ?>
    				<?php
    					get_template_part( 'template-parts/content', get_post_type() );
    
    				?>
    			</section>

    Leaving it here just in case someone needs the same.
    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrea De Giovine

    (@andreadegiovine)

    Hello @nimmalareddy
    I just added the 1.2.6 update which includes compatibility with the Blocksy theme and the resolution of some small bugs.
    Let me know if you find other difficulties.
    Good development!

    Thread Starter nimmalareddy

    (@nimmalareddy)

    Now it adds this line within the <section> tags
    <?php custom_post_types_get_custom_template(); ?>
    but deletes the following, without which content area is not displayed (it’s only showing custom field data).
    <?php get_template_part( 'template-parts/content', get_post_type() ); ?>

    Both lines should stay. Please check.
    Thanks for pushing updates as needed.

    Plugin Author Andrea De Giovine

    (@andreadegiovine)

    This is the right way to work, so you have an empty layout with theme style (same styles, same html elements, etc …) and you can create the single template as you want (by the builder).
    In your specific case, to have both templates (original template under the custom template) you need to paste this code:
    <?php get_template_part( 'template-parts/content', get_post_type() ); ?>
    below this line:
    <?php custom_post_types_get_custom_template(); ?>

    Let me know if I can do anything else.

    Thread Starter nimmalareddy

    (@nimmalareddy)

    Your approach seems more logical.
    I can simply include content short code ( [custom-field id=”content”]) within the template am creating via your plugin.

    Thanks for clarifying.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fix for Blocksy theme’ is closed to new replies.