Okay
  Public Ticket #1482257
Custom Post Type Template
Closed

Comments

  • matthewjbloomfield started the conversation

    The website is for a tv show, I have been adding individual episodes as blog posts: https://www.theincrediblejourney.tv/2310-2/

    But rather than use the template tool to copy the post layout each time I want to do it properly, I have created a custom post type for episodes with custom fields, is there an easy way to copy the rough layout from my current posts  to a custom post template ie single-episodes.php. I have started by just copying the single.php file and modifying that, but I was wondering if there was a way to copy the layout into the new template.

    For instance part of the code for the above post is:

    [vc_row type="full_width_background" full_screen_row_position="middle" bg_image="2311" bg_position="right top" bg_repeat="no-repeat" bg_color="#071c58" scene_position="center" text_color="light" text_align="left" top_padding="4%" bottom_padding="8%" color_overlay="#071c58" overlay_strength="0.3" enable_shape_divider="true" shape_divider_color="#ffffff" shape_divider_position="bottom" shape_divider_height="100" shape_type="curve_opacity"][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" width="1/1" tablet_text_alignment="default" phone_text_alignment="default" column_border_width="none" column_border_style="solid"][vc_column_text css_animation="fadeInUp" css=".vc_custom_1519356001109{margin-bottom: 15px !important;}"]
    Episode 16
    [/vc_column_text][split_line_heading]
    Along The Rabbit-Proof Fence
    [/split_line_heading][vc_row_inner column_margin="default" text_align="left"][vc_column_inner column_padding="padding-4-percent" column_padding_position="left-right" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" bottom_margin="-26%" width="1/1" column_border_width="none" column_border_style="solid"][vc_video link="https://www.youtube.com/watch?v=6akphqg-hsE"][/vc_column_inner][/vc_row_inner][divider line_type="No Line" custom_height="50"][/vc_column][/vc_row][vc_row type="full_width_background" full_screen_row_position="middle" scene_position="center" text_color="dark" text_align="left" top_padding="7%" bottom_padding="4%" overlay_strength="0.3" shape_divider_position="bottom" shape_type=""][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" width="1/4" tablet_text_alignment="default" phone_text_alignment="default" column_border_width="none" column_border_style="solid"][/vc_column][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" width="1/2" tablet_text_alignment="default" phone_text_alignment="default" column_border_width="none" column_border_style="solid"][divider line_type="No Line" custom_height="50"][vc_column_text]
    [addtoany]
    [/vc_column_text][split_line_heading]
    Overview
    [/split_line_heading][vc_column_text]
    All of us in Australia are familiar with the story of the Rabbit-Proof Fence - the remarkable true story of three young Aboriginal girls who crossed the harsh Australian desert on foot to return to their home. The nine-week walk was a complex adventure, but it is also a reminder of what can be achieved when we hold onto hope and find the faith to step out into the unknown.
    [/vc_column_text][divider line_type="No Line" custom_height="50"][/vc_column][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" width="1/4" tablet_text_alignment="default" phone_text_alignment="default" column_border_width="none" column_border_style="solid"][/vc_column][/vc_row][vc_row type="full_width_background" full_screen_row_position="middle" scene_position="center" text_color="light" text_align="left" top_padding="4%" overlay_strength="0.3" shape_divider_color="#ffffff" shape_divider_position="top" shape_divider_height="80" shape_type="curve"][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" column_shadow="none" column_border_radius="none" width="1/1" tablet_text_alignment="default" phone_text_alignment="default" column_border_width="none" column_border_style="solid" translate_y="-50%"][vc_row_inner column_margin="default" translate_y="-100" text_align="left"][vc_column_inner column_padding="padding-6-percent" column_padding_position="all" centered_text="true" background_color="#071c58" background_color_opacity="1" background_hover_color_opacity="1" font_color="#ffffff" column_shadow="medium_depth" column_border_radius="15px" width="1/2" column_border_width="none" column_border_style="solid"][vc_custom_heading text="Want to receive this week's free offer?" font_container="tag:h2|text_align:center" use_theme_fonts="yes"][nectar_btn size="jumbo" button_style="see-through-2" color_override="#ffffff" hover_color_override="#ffffff" hover_text_color_override="#000000" icon_family="none" url="http://localhost:8888/free-offers/" text="Request Free Offer" margin_top="30" margin_bottom="1"][/vc_column_inner][vc_column_inner column_padding="padding-6-percent" column_padding_position="all" centered_text="true" background_color="#ff760e" background_color_opacity="1" background_hover_color_opacity="1" font_color="#ffffff" column_shadow="medium_depth" column_border_radius="10px" width="1/2" column_border_width="none" column_border_style="solid"][vc_custom_heading text="Want to know more about the Bible?" font_container="tag:h2|text_align:center" use_theme_fonts="yes"][nectar_btn size="jumbo" button_style="see-through-2" color_override="#ffffff" hover_color_override="#ffffff" hover_text_color_override="#000000" icon_family="none" url="http://localhost:8888/free-offer-bible-studies/" text="Request Free Studies" margin_top="30" margin_bottom="1"][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]

    I really want to still make use of the shortcodes as I love the theme. I know this question is beyond the support forum but even if you could just give me a point in the right direction I would be very grateful.

    Thanks heaps,

    Matthew

  •  8,468
    Tahir replied

    Hey Again,

    If you want to use Vc Shortcode and add that as part of the php template file you will have to use the "do_shortcode " php function . See url : https://developer.wordpress.org/reference/functions/do_shortcode/  .

    B.est 


    ThemeNectar Support Team