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)
-   -   How to create an archive page. (http://forum.bytesforall.com/showthread.php?t=18610)

2chicks Oct 8, 2012 05:03 PM

How to create an archive page.
 
In Atahualpa you can specify, in the theme options, a page ID to display the archive content on.

I am having trouble as to how exactly you would do that same thing in Montezuma. Do you have to code your own archive page template?

If so, I have absolutely so idea how to start on something like that.

Thank you for the help! I am sure this is a dumb question, just not familiar with how this theme works yet.

juggledad Oct 8, 2012 07:18 PM

Quote:

Do you have to code your own archive page template?
yes
Quote:

If so, I have absolutely so idea how to start on something like that.
create a new main template called archive.php and copy the index.php template to it. Edit it to your liking

it's good to know how the WordPress Template Hierarchy works (do a google search)

2chicks Oct 9, 2012 11:11 AM

With the limited coding available in the theme, I don't see a token to bring in the archive pages. Do you have any ability to bring in the archive page list?

juggledad Oct 9, 2012 11:25 AM

Take a look at the 'Main Templates' section of the theme and read the on screen documentation.

2chicks Oct 10, 2012 09:36 AM

I understand how the templates work. I am just not sure how to code an archive page with the limited PHP in Montezuma. Is there any documentations or guide how to code that kind of a page, like Atahualpa does automatically?

I very new to this theme and I have a team waiting on a project over this one issue. I really appreciate your continued help about this.

2chicks Oct 11, 2012 11:52 AM

Maybe I am being too vague.

These are the steps I have completed so far:

-Added a main template named "archive.php" made from a copy of the main template "index.php"
-Assigned that template to a page called "Archive"
-Checked the page on the front end and there was nothing on the page other than the title

Have I done something wrong while doing these steps?

juggledad Oct 11, 2012 03:08 PM

The archive page will be a multi post page with the posts from the time you chose. For example, if you have an archive widget and select September 2012 and there are 5 posts from then, that is what you will see. It will look exactly like the index.php until you make changes to it.

2chicks Oct 25, 2012 04:29 PM

Partial success in making an archive page. Within the Montezuma Options, I created a main template called "page-archive.php". This page shows a search box and Archives by Category as desired. However, the Archives by Month doesn't work.

I would like the Archives by Month to work like the standard Archives widget that appears on the sidebar, and show links for "Month, Year" for each month/year that there are posts. Here's my code for this virtual template page-archive.php:

Code:

<div id="container">
<?php get_header(); ?>
<div id="main" class="row">
    <div id="content" class="cf col8">
          <?php the_post(); ?>
          <h1 class="entry-title"><?php the_title(); ?></h1>
          <?php get_search_form(); ?>
          <h2>Archives by Month:</h2>
          <ul>
          <?php wp_get_archives('type=monthly&format=html&show_post_count=false&echo=1'); ?>
          </ul>
          <h2>Archives by Category:</h2>
          <ul>
              <?php wp_list_categories(); ?>
          </ul>
    </div>
    <div id="widgetarea-one" class="col4">
          <?php dynamic_sidebar( 'Widget Area ONE' ); ?>
    </div>
</div>
<?php get_footer(); ?>
</div><!-- #container -->

...any suggestions on how I might get this to work? Thanks

juggledad Oct 25, 2012 06:47 PM

wp_get_archives() is not one of the limited PHP that is available.

I've created an RFE for this

claidig Feb 23, 2014 09:30 PM

Quote:

Originally Posted by juggledad (Post 91875)
wp_get_archives() is not one of the limited PHP that is available.

I've created an RFE for this

I am experiencing the SAME EXACT problem as outlined above..I made the archive.php page from a copy of the index but I am only getting the title to display..no other content on the output of the archive page.

I am not sure what an RFE is, can someone help me out here on how to get the archive page setup.
Thank you.

juggledad Feb 24, 2014 03:05 AM

(RFE = Request For Enhancement)

Here is a way to do this.
1) install the plugin 'exec php'
2) create a 'Main Template' called 'Archive.php'
3) In the template add the following
HTML Code:

<?php dynamic_sidebar( 'mtz-archive' ); ?>
4) go to dashboard->appearances->widgets and add a 'text' widget to the widget area 'mtz-archive'
5) add the following code to the text widget
HTML Code:

<div id="container">
<?php get_header(); ?>
<div id="main" class="row">
    <div id="content" class="cf col8">
          <?php the_post(); ?>
          <h1 class="entry-title"><?php the_title(); ?></h1>
          <?php get_search_form(); ?>
          <h2>Archives by Month:</h2>
          <ul>
          <?php wp_get_archives('type=monthly&format=html&show_post_count=false&echo=1'); ?>
          </ul>
          <h2>Archives by Category:</h2>
          <ul>
              <?php wp_list_categories(); ?>
          </ul>
    </div>
    <div id="widgetarea-one" class="col4">
          <?php dynamic_sidebar( 'Widget Area ONE' ); ?>
    </div>
</div>
<?php get_footer(); ?>
</div><!-- #container -->

6) add a new page called what ever you want and select the Virtual Template 'Archive' (The 'Virtual Template box is in the right column of the page edit area
Thats it, when you go to your ppage you will see the archives by month and category

claidig Feb 24, 2014 11:58 AM

Thank you for the extra help on this..I am fairly certain the issue I have recently PM'ed you about is caused by this same thing now.

I did all the steps you outlined and I am getting the same result still where "JUST THE TITLE" of one post is being displayed but no posts (or in the case of the PM issue..no wpsc products are displayed, only one title).

This is the same thing that was happening to the starter of this thread (2Chicks) but I can't tell if they got a solution or not.

Thanks again, hoping I can get this figured out as I think it's a simple something somewhere...lol

juggledad Feb 24, 2014 12:28 PM

when you use wp_get_archives() it gives you a list of the archives as a link to the full post. This is a wordpress function and you can read about it in the wordpress codex - try a google search.

claidig Feb 25, 2014 01:16 PM

Quote:

Originally Posted by juggledad (Post 106890)
when you use wp_get_archives() it gives you a list of the archives as a link to the full post. This is a wordpress function and you can read about it in the wordpress codex - try a google search.

I think I am understanding how the archives work (still have more to learn) but I am not getting the list of archives as you mentioned after following your detailed instructions.

I can never read an archive..but only get a display of one title of one post with a search box under it.
This is the same exact thing that is happening with the products problem on PM (minus the search box).

But if I change themes then both archives and products work fine which shows me what they should look like.

I really am good at googling and figuring this stuff out...usually...lol but this one has me in it about 15 or more hours now..trying everything I can think of...twice...lol

Thanks.


All times are GMT -6. The time now is 03:50 AM.

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