Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

adding physical templates


  #26  
Old Jan 9, 2013, 10:32 AM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by juggledad
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?"
  #27  
Old Apr 22, 2013, 01:02 AM
stevenkwok
 
1 posts · Apr 2013
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
Attached Thumbnails
Click image for larger version

Name:	auhor-bio-box.png
Views:	698
Size:	20.9 KB
ID:	2317  

Bookmarks

Tags
custom, php, shortcode, templates

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Templates for navigation bar JakeThePeg Page & Category Menu Bars 2 Jan 20, 2010 10:33 PM
Templates viscouse Atahualpa 3 Wordpress theme 2 Jun 12, 2009 10:59 AM
Using my own templates nickcee Atahualpa 3 Wordpress theme 1 May 16, 2009 06:56 PM
Different Page templates paulae Atahualpa 3 Wordpress theme 2 Mar 10, 2009 04:08 PM


All times are GMT -6. The time now is 11:12 PM.


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