Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1305602
    royalcyber
    Participant

    I am using X theme Version: 4.6.4 I would like to create a custom post view for the particular post category like “Casestudies”. “Resources” is the parent category of the Casestudies. I have created two files “single-casestudies.php” and “wp-single-casestudies.php”

    But the above files are called when i view the case study post details.

    here is the my code for SINGLE-CASESTUDIES.PHP // under x-child folder

    <?php

    // =============================================================================
    // SINGLE-CASESTUDIES.PHP
    // —————————————————————————–
    // Handles output of individual posts.
    //
    // Content is output based on which Stack has been selected in the Customizer.
    // To view and/or edit the markup of your Stack’s posts, first go to “views”
    // inside the “framework” subdirectory. Once inside, find your Stack’s folder
    // and look for a file called “wp-single.php,” where you’ll be able to find the
    // appropriate output.
    // =============================================================================

    ?>
    sdsads
    <?php x_get_view( x_get_stack(), ‘wp’, ‘single-casestudies’ ); ?>

    here is the my code for WP-SINGLE-CASESTUDIES.PHP // under x-child/framework/view/folder

    // =============================================================================
    // VIEWS/RENEW/WP-SINGLE-CASESTUDIES.PHP
    // —————————————————————————–
    // Single post output for Renew.
    // =============================================================================

    $fullwidth = get_post_meta( get_the_ID(), ‘_x_post_layout’, true );

    ?>
    <div>asdsd</div>

    <?php get_header(); ?>

    <div class=”x-container max width offset”>
    <div class=”<?php x_main_content_class(); ?>” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>
    <?php x_get_view( ‘renew’, ‘content’, get_post_format() ); ?>
    <?php x_get_view( ‘global’, ‘_comments-template’ ); ?>
    <?php endwhile; ?>

    </div>

    <?php if ( $fullwidth != ‘on’ ) : ?>
    <?php get_sidebar(); ?>
    <?php endif; ?>

    </div>

    <?php get_footer(); ?>

    #1305652
    Paul R
    Moderator

    Hi,

    Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #1305719
    royalcyber
    Participant
    This reply has been marked as private.
    #1305758
    Rupok
    Member

    Hi there,

    Thanks for writing back. Custom posts are same for all themes. That is if you register your own custom post that will work with any theme as it’s plugin territory functionality and doesn’t rely on theme. So if your custom post work for other theme then it will work for X as well. You can follow this to create custom posts properly – https://codex.wordpress.org/Post_Types

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1305602 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>