Jeremy

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Jeremy
    Participant

    The Code that i changed was in Hermes from ThemeForest.

    You might have something simliar, i also debugged the query with

    print_R($wp_query);
    on the page.php

    Jeremy
    Participant

    found my problem code.

    The theme removed from the_content, wpautop and wptexturize. It then placed its own formatter in. This formatter add p’s and br everywhere which then stuff up the navigation bar.

    I corrected this by looking for tribe-events and jumping out of the formatter function.

    function pp_formatter($content) {

    if ( strpos($content, ‘tribe-events’)!== false )
    {
    return $content;
    }

    // Remove the 2 main auto-formatters
    remove_filter(‘the_content’, ‘wpautop’);
    remove_filter(‘the_content’, ‘wptexturize’);

    // Before displaying for viewing, apply this function
    add_filter(‘the_content’, ‘pp_formatter’, 99);
    add_filter(‘widget_text’, ‘pp_formatter’, 99);

    Jeremy
    Participant

    Hi Rob,

    Just tracked down the php code that made it disappear.

    global $query_string;
    query_posts($query_string . “&page_id=”.$current_page_id);

    the page.php was trying to get the current page id/post id but when it failed to collect, it would call query_posts. this would lose the blank events calender posts that were lined up.

    now that i’ve got that corrected, it seems the navigation for the grid goes funky when there is nothing to display :/

Viewing 3 posts - 1 through 3 (of 3 total)