Blank Template / New Block for Custom Post Type

Posted in: Newspaper
Post count: 4

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!

Post count: 4

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
Post count: 4

Figured out pagination.

<?php echo td_page_generator::get_pagination(); ?>

I think I’ve resolved all my issues on my own. You can close this out.

Thanks!

Post count: 780

Hello,

sorry for the delay. We were all out for the weekend. I’m glad that you managed to fix it.

Post count: 20

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.

Post count: 3343
Post count: 85

@matthewvb

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?

Post count: 4

@sunkast:

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(); ?>
Post count: 85

Thank you matthewvb.

Post count: 3343

Great @matthewvb
Many thanks.


@sunkast
hope will work for you.

Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.