Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter willdonovan

    (@willdonovan)

    thanks j – curious about your comment on the footer – any chance you could e-mail me a screenshot of what it looks like on your screen?

    Forum: Your WordPress
    In reply to: Thinking Aloud

    it’s nice, man, if a little graphically much – but i think that’s what you were going for?

    hi – yeah, i figured this out while failing to figure out something else

    <?php
    global $wp_query;
    
     if ( empty($wp_query->post->post_parent) )
     { ?> this text displayed if page is a parent <?php } else { ?> this text displayed if page is a child <?php } ?>

    alternatively, if you’re doing navigation which is mainly the question here (i’m using the fold page plugin which is why the call ( wswwpx_fold_page_list ) looks funny) you can do something like this (see below) – check out the “Navigation” area here: https://www.smallpointclub.com/?page_id=59 | the effect is that the user can click up and down the sub pages and see where they are in relation to the page-parent and the other page-children

    <?php
    global $wp_query;
    
    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    $parent_title = $wp_query->post->post_title;
    } else {
    $parent = $wp_query->post->post_parent;
    $parent_title =
    $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $parent");
    }
    ?>
    
    <h2><a href="https://fernald4portland.com/?page_id=<?php echo apply_filters('the_title', $parent); ?>">"<?php echo apply_filters('the_title', $parent_title);?>"</a></h2>
    
    <ul id="mininav">
    <?php wswwpx_fold_page_list ("&sort_column=menu_order&title_li=&child_of=$parent"); ?>
    </ul>

    CSS to style this:

    /* Begin Mini Nav */
    
    #mininav {
            padding: 8px;
            width: 150px;
            float: right;
            margin-left: 20px;
            margin-bottom: 8px;
    
    }
    
    #mininav li, #mininav ul {margin-left: 0px; padding-left: 0px; list-style: none;}
    
    #mininav a {
            font-size: .8em;
            color: #222;
            text-decoration: underline;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininav a:hover {
            color: #600000;
            text-decoration: none;
    }
    
    #mininavnews a {
            font-size: .7em;
            color: #222;
            text-decoration: underline;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininavnews a:hover {
            color: #600000;
            text-decoration: none;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininav li.current_page_item a {
            color: #600000;
            text-decoration: none;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininav li ul {
            margin: 0px 0px 0px 5px;
            padding: 0px;
            list-style: none;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininav li ul li.page_item a {
            color: #000;
            text-decoration: underline;
            list-style: none;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    
    #mininav li ul li.page_item a:hover {
            color: #600000;
            text-decoration: none;
            margin-left: 0px !important; padding-left: 0px !important;
    }
    Thread Starter willdonovan

    (@willdonovan)

    projectego – you caught me while i was trying to fix the browser detection for css files! sorry!

    thanks all for your thoughts! much appreciated.

    Thread Starter willdonovan

    (@willdonovan)

    Hi all – I was able to take a number of the tactics that zurdog used, including his excellent explanation of the use of the get-meta plugins, to build this site, with the idea in mind of creating a highly-automated CMS for real estate agents that’s simple, easy to use, and operates in a blog format to take full advantage of RSS capabilities.

    You can see it here: https://www.william-donovan.com/real/realtor

    I think it definitely shows how far you can flex WordPress to work as a CMS.

    You’ll notice I had to use multiple single-page templates and multiple comment-templates – To that end, I was able to turn WP’s comment interface into a mini-referral system in the back end (which works great because of the WHOIS data). For that I had to eliminate WP’s requirement of a message, but it was pretty easy to find.

    I also used a pretty nifty hack I wrote for the fold_page plugin that creates a “kaleidoscopicing” effect for static-page navigation (if you’re wondering, I’ve also written this to work with “pretty” permalinks):

    <?php
    global $wp_query;
    
    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    $parent_title = $wp_query->post->post_title;
    } else {
    $parent = $wp_query->post->post_parent;
    $parent_title =
    $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $parent");
    }
    ?>
    
    <h2>
    
    <li class=<?php if (empty($wp_query->post->post_parent ) )  { ?> "page_item current_page_item"<?php  } else { ?>"page_item"<?php } ?> >
    <!--<?php bloginfo('wpurl'); ?> This is usually not necessary-->
    <a href="?page_id=<?php echo apply_filters('the_title', $parent); ?>">
    <?php echo apply_filters('the_title', $parent_title);?></a></li>
    </h2>
    
    <?php wswwpx_fold_page_list ("&sort_column=menu_order&title_li=&child_of=$parent"); ?>

    Finally, I customized a number of plugins, especially the SEO all_in_one, search_everything, DD’s awesome contact form, site map, and AddSig plugins, the myGallery and myFlash plugins, the backup plugin, and of course, as I expect the several agents already lined up to use this template to do most of their own inputing of data, the fantastic custom_admin_menu, dashboard_management, and barruno_theme plugins.

Viewing 6 replies - 1 through 6 (of 6 total)