• North

    (@cameronnorth23yahoocom)


    Love this plugin. I have figured out how to customize css etc, but cannot edit the main page template successfully (mainly because I’m a relative noob) – I need a very white label page for a client. I’ve made the below changes o my desktop site, but cannot figure out how to remove them from the Mobil Pack version.

    Here’s what I need to do. I need to remove the following items:
    (I just want the page info to appear)
    – Top Menu
    – Page Title
    – Date & Author line

    – Posted In | Comments
    – Next Post

    In Footer:
    – Powered by…
    – Designed by…

    (I want to keep “Switch”)

    Here is the php – every time I change it I break the page

    <?php

    get_header();

    $wpmp_title = ”;
    $wpmp_archives = false;
    $wpmp_not_found = false;
    if (isset($_GET[‘archives’]) && ($archives = $_GET[‘archives’])!=”) {
    $wpmp_title = __(“Blog archives”, ‘wpmp’);
    $wpmp_archives = true;
    } elseif (have_posts()) {
    $post = $posts[0];
    if (is_search()) {
    $wpmp_title = __(“Search results”, ‘wpmp’);
    } elseif (is_tag()) {
    $wpmp_title = sprintf(__(“Archive for the ‘%s’ tag”, ‘wpmp’), single_tag_title(”, false));
    } elseif (is_category()) {
    $wpmp_title = sprintf(__(“Archive for the ‘%s'”, ‘wpmp’), single_cat_title(”, false));
    } elseif (is_day()) {
    $wpmp_title = sprintf(__(“Archive for %s”, ‘wpmp’), get_the_time(‘F jS, Y’));
    } elseif (is_month()) {
    $wpmp_title = sprintf(__(“Archive for %s”, ‘wpmp’), get_the_time(‘F, Y’));
    } elseif (is_year()) {
    $wpmp_title = sprintf(__(“Archive for %s”, ‘wpmp’), get_the_time(‘Y’));
    } elseif (is_author()) {
    $wpmp_title = __(“Author archive”, ‘wpmp’);
    } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) {
    $wpmp_title = __(“Blog archives”, ‘wpmp’);
    } elseif (!is_single() && !is_page()) {
    $wpmp_title = __(“Recent posts”, ‘wpmp’);
    }
    } else {
    $wpmp_title = __(“Page not found”, ‘wpmp’);
    $wpmp_not_found = true;
    }

    print “<div id=’wrapper’><div id=’content’>”;
    if ($wpmp_title!=”) {
    print “<h1>$wpmp_title</h1>”;
    }

    if ($wpmp_not_found) {
    print “<p>” . __(“Use the menu to navigate the site, or search for a keyword:”, ‘wpmp’) . “</p>”;
    include (TEMPLATEPATH . “/searchform.php”);

    } elseif ($wpmp_archives) {
    if ($archives==’category’) {
    print “<h2>” . __(“Archives by category”, ‘wpmp’) . “</h2>”;
    $links = array();
    foreach(get_categories() as $category) {
    $links[] = “term_id ) . “‘>$category->name“;
    }
    $links = implode(‘, ‘, $links);
    } elseif ($archives==’tag’) {
    print “<h2>” . __(“Archives by tag”, ‘wpmp’) . “</h2>”;
    $links = array();
    foreach(get_tags() as $tag) {
    $links[] = “term_id ) . “‘>$tag->name ($tag->count)”;
    }
    $links = implode(‘, ‘, $links);
    } elseif ($archives==’week’ || $archives==’month’ || $archives==’year’) {
    print “<h2>” . sprintf(__(“Archives by %s”, ‘wpmp’), $archives) . “</h2>”;
    $links = ” “;
    wp_get_archives(array(‘type’=>$archives.’ly’, ‘show_post_count’=>true));
    }
    if($links) {
    print “<p>$links</p>”;
    } else {
    print “<p>” . __(“No archives found. Use the menu to navigate the site, or search for a keyword:”, ‘wpmp’) . “</p>”;
    include (TEMPLATEPATH . “/searchform.php”);
    }
    } else {
    global $more;
    $more=(is_single() || is_page())?1:0;

    if (file_exists($wpmp_include = wpmp_theme_group_file(‘index.php’))) {
    include_once($wpmp_include);
    } else {
    while (have_posts()) {
    the_post();
    print ‘<div class=”post” id=”post-‘ . get_the_ID() . ‘”>’;
    if(is_single() || is_page()) {
    print ‘<h1>’ . get_the_title() . ‘</h1>’;
    wpmp_theme_post_single();
    } else {
    print ‘<h2>‘ . get_the_title() . ‘</h2>’;
    wpmp_theme_post_summary();
    }
    }
    if(!is_single() && !is_page()) {
    print ‘<p class=”navigation”>’;
    next_posts_link(__(‘Older’, ‘wpmp’));
    print ‘ ‘;
    previous_posts_link(__(‘Newer’, ‘wpmp’));
    print ‘</p>’;
    }
    }
    }
    function wpmp_theme_post_single() {
    wpmp_theme_post(true);
    print ‘<p class=”metadata”>’; previous_post_link(__(‘Previous post:’, ‘wpmp’) . ‘ %link’); print ”; next_post_link(__(‘Next post:’, ‘wpmp’) . ‘ %link’); print ‘</p>’;
    if(!function_exists(‘wpmp_transcoder_is_last_page’) || wpmp_transcoder_is_last_page()) {
    global $post;
    if (!$post->comment_status==’open’) {
    print ‘<p class=”metadata”>’ . __(‘Comments are closed for this post.’, ‘wpmp’) . ‘</p>’;
    print ‘</div>’;
    } else {
    print ‘</div>’;
    comments_template();
    }
    }
    }
    function wpmp_theme_post_summary() {
    wpmp_theme_post();
    print ‘</div>’;
    }
    function wpmp_theme_post($single = false) {
    global $wpmp_summary_first;
    if (!isset($wpmp_summary_first)) {
    $wpmp_summary_first=true;
    }
    $summary = get_option(‘wpmp_theme_post_summary’);
    $metadata = get_option(‘wpmp_theme_post_summary_metadata’)==’true’;
    if ($single || $metadata) {
    print ‘<p class=”metadata”>’. get_the_time(‘F jS, Y’) . ‘ by ‘ . get_the_author() . ‘</p>’;
    }
    if ($single || ($summary!=’none’ && ($summary!=’firstteaser’ || $wpmp_summary_first))) {
    print ‘<div class=”entry”>’;
    the_content(__(‘Read more’, ‘wpmp’));
    print ‘</div>’;
    $wpmp_summary_first = false;
    }
    if ($single || $metadata) {
    print ‘<p class=”metadata”>’ . __(‘Posted in ‘, ‘wpmp’);
    the_category(‘, ‘);
    edit_post_link(‘Edit’, ‘ | ‘, ”);
    print ‘ | ‘;
    comments_popup_link(‘No comments’, ‘1 comment’, ‘% comments’);
    print ‘</p>’;
    }
    }
    ?>
    </div>
    <?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter North

    (@cameronnorth23yahoocom)

    – bump –

    Thread Starter North

    (@cameronnorth23yahoocom)

    bump. Anyone?

    To remove the metadata (Date and Author Line) from below the post/page title, delete or comment out this section:

    if ($single || $metadata) {
    print '<p class="metadata">'. get_the_time('F jS, Y') . ' by ' . get_the_author() . '</p>';
    }

    To remove the top menu, you’ll have to edit code that is in the header.php file, not the index file.

    To remove the post/page title, delete or comment out the following line:
    print '<h1>' . get_the_title() . '</h1>';

    Hope that helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Mobile Pack] Remove Page features’ is closed to new replies.