Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   adding physical templates (http://forum.bytesforall.com/showthread.php?t=19099)

jerryc Jan 9, 2013 10:32 AM

Quote:

Originally Posted by juggledad (Post 94704)

Yes, great idea. The RFE was closed, so I'll add my comment here.

Besides just saying "Are you sure?," perhaps include a more detailed explanation, like:

"Resetting this template will restore it to its default settings. Are you sure this is what you want to do?"

stevenkwok Apr 22, 2013 01:02 AM

1 Attachment(s)
I just read the replies and knew that someone can not add a physical template to the Montezuma Theme. While I have succeeded, now share some of my experience.

Before my coding, I upgraded the version of the theme to 1.8. (I don't know if this is necessary)

As I wanted to add an "Author Biography Box" to every post, firstly I created a single.php file under my website's root diretory based on the content from the single.php on the visual template dashboard.

And remember to add these codes before the codes just copiey from the visual template:

PHP Code:

<?php get_template_part'head' ); ?>
</head>
<body <?php body_class(); ?>>


Also change the codes of <?php wp_footer(); ?> like this:

PHP Code:

<?php bfa_get_template_part'footer' ); ?>
<?php wp_footer
(); ?>
</body>
</html>


You should know that the funtions in single.php from visual template are operated in Loop.
So in the physical template you should add loop to surround the these funtions.

PHP Code:

<?php while ( have_posts() ) : the_post(); ?>

//codes here.

<?php endwhile; // end of the loop. ?>

The attachment is the appearance of the "Athor Biograpy Box" I added. Also you can visit the single.php page like this: ikea-make-more-of-your-garden


All times are GMT -6. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.