I setup a custom post type and wanted to loop through it on a page while preserving the theme, sidebars, etc. Ideally I’d want to create something like a custom block using something like the visual page editor to control how my custom posts display on a page. However, that’s probably not realistic.
So, my questions would be:
1. Is there a “blank” page template with just the settings in the theme available? Something that I can use as a base for setting up my page?
2. Is there a template for creating blocks so users could take your existing blocks and tweak them to maybe fit a custom post type or something else?
Thanks!
I think I may have got a template running (really basic).
Another question: Is there a way to call up your pagination code in:
td_page_genenator
Similar to the homepage with background pagination?
-
This reply was modified 12 years by
matthewvb. Reason: formatting
Hi Mathew,
I also want to create a custom block which I could change a bit from the existing elements, so can you show me how?
For example, I want to create a block of 1 row and 3 columns with a slider (screenshot: http://www.screencast.com/t/WsQt683Zn2i) or a column like this: http://www.screencast.com/t/UdEUoYwOb
I couldn’t find it from the existing elements of the theme.
Thanks in advance.
Hello,
@NewWP please see the answer here: https://forum.tagdiv.com/topic/question-about-sample-template-on-themeforest/
I’d be interested in learning more about your solution as I am also trying to create a custom template. Would you be able to share your solution and possibly the code you used?
Generic – I used it for a custom post type, but throw in what you’d like. Framework is all there.
<?php
/* Template Name: Media Tracker - Custom */
get_header();
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
//define $args here.
$wp_query = new WP_Query( $args );
?>
<div class="container td-page-wrap">
<div class="row">
<div class="span12">
<div class="td-grid-wrap">
<div class="container-fluid">
<h1 itemprop="name" class="entry-title td-page-title">Page Title</h1>
<?php
if (have_posts()) { ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post();?>
<?php // output loop contents here ?>
<?php endwhile; ?>
<?php echo td_page_generator::get_pagination(); ?>
<?php } else {
echo td_page_generator::no_posts();
} ?>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
