WordPress.org

Forums

Page Archive (4 posts)

  1. pverrone
    Member
    Posted 2 years ago #

    I've run into an archive page issue I don't understand on a wordpress site I am trying to fix.

    We have a page, "events" with an integrated calendar from meetup.com. (FWIW, The previous devs had created this page with a google calendar widget.)

    I have changed the page content to include the meetup shortcode, but the page will only pull from the archive.php template page. Therefore, it will not show the calendar layout, just a single event.

    I have installed wp-debug, and it says the query type is "archive".

    For testing, I created an events_test page, with all of the same settings, and it displays just fine. (wp-debug query type is "page")

    Can anyone explain why/how the older page got set as archive, and how I can change it back?

    You can view the two pages here.
    http://pvdev.mission50.com/events
    http://pvdev.mission50.com/events_test

    Thanks so much! Please let me know what other info you may need.

  2. Shaun Scovil
    Member
    Posted 2 years ago #

    It sounds like a rewrite issue. Be sure the plugin used to create the page is deactivated, then go to WP-Admin > Settings > Permalinks. Visiting that page will flush your rewrite rules, which might resolve the problem.

    More info: http://codex.wordpress.org/Rewrite_API

  3. pverrone
    Member
    Posted 2 years ago #

    Thanks for the reply Shaun!

    Not sure what plugin might have been used. I think it was just written using the default WP page editor.

    I have refreshed the permalinks a couple of time, and just did it again. No change.

    Check this out though, I tried deleting the offending "events" page and it still shows up!
    It is querying as an archive and is being written with the index.php page.

  4. Shaun Scovil
    Member
    Posted 2 years ago #

    Let's do a little troubleshooting...

    Add this to your functions.php file:

    function test_06182013() {
        echo '<h2>Post Types:</h2>';
        $post_types=get_post_types('','names');
        foreach ($post_types as $post_type ) {
            echo '<p>'. $post_type. '</p>';
        }
        echo '<h2>Taxonomies:</h2>';
        $taxonomies=get_taxonomies('','names');
        foreach ($taxonomies as $taxonomy ) {
            echo '<p>'. $taxonomy. '</p>';
        }
    }
    add_shortcode('test_06182013','test_06182013');

    Then, use this shortcode on a post or page that nobody will see: [test_06182013].

    View the page and let me know what it displays. If there is a registered post type or taxonomy called events, that would explain it. WordPress will look for index-events.php first as a template, then index.php.

    To resolve it, you would need to rename or get rid of that post type or taxonomy...or kill the plugin or theme that is adding it.

Topic Closed

This topic has been closed to new replies.

About this Topic