Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • in reply to: Styling on custom menu #146789
     mitchcan
    Participant
    This reply has been set as private.
    in reply to: query today's posts #113740
     mitchcan
    Participant

    OK, I take that back — not the good support part 🙂 – but the I fixed it part.

    That first piece of code I added made it a 3 column page. Forgot that. Ooops. And the TZ issue is as resolved as I’m going to get it.

    But the other issue was that the “kleo-page-bottom” did not show on the page template. I’ve tried about 15 variations of the code, with no joy.

    Attached screencap shows that kleo-page-bottom IS there. And I DO have some content in that box on that page (tested with the Default template and it DOES show there). But for some reason it doesn’t show with this page template.

    I do have some functions code that I thought might mess with it:

    COPY CODE
    /* this added a widget area after main content ONLY */
    add_action( 'kleo_after_main_content','kleo_main_content_bottom');
    function kleo_main_content_bottom() {
          echo '<div id="after-main-content">', do_shortcode('[widgets_on_pages id="wop-5"]'), '</div>';  //you could put a shortcode here if you want, too.
    }

    but lack of display issue remains even if I comment out that code. So it has to be something in the template.

    Any guidance on where to look is still appreciated. If it proves too difficult, I could just move on, but little things that seem like they should work but don’t always get me. 🙂

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    in reply to: query today's posts #113728
     mitchcan
    Participant

    Hi Laura,

    I just wanted to update. I resolved this issue. I’ll post here, in case I forget later I can check back. 🙂

    For the template, looking at my notes, best I can tell is I added:

    COPY CODE
    <?php
    //create 3lr template
    kleo_switch_layout('3lr');
    ?>
    

    to the code, which seemed to get me the sidebar and footer. Not sure if that’s what did it, but it works now. 🙂

    For the time zone issue, I simply used:

    COPY CODE
    <?php
    $args = array(
        'post_type' => 'post',
        'post_status' => 'publish',
        'orderby' => 'date',
        'order' => 'DESC',
    
        // Using the date_query to filter posts from last week
        'date_query' => array(
            array(
                'after' => '30 hours ago'
            )
        )
    ); 
    query_posts( $args );?>

    instead of the getdate and made it a lookback of 30 hours. Not perfect, but I got tired of trying to figure out how to adjust the query to account for UTC vs. local TZ. 🙂

    Thanks again for getting me that far.

    Hey @abe – it’s support like this from @laura and what @sharmstr always provides that will make it where I buy another license for this theme next month.

    Thanks.

    in reply to: Oh my Gosh, not another kleo_somewhere question #71164
     mitchcan
    Participant

    I see you already pushed 3.0.6 with the before-wrap change, cool. I still need to fix the after-wrap. Thought I’d try this… so in general-after-wrap, would I put

    COPY CODE
    <section class="container-wrap main-color">
    	<div id="main-container" class="<?php echo $container; ?>">
    		<?php if($container == 'container') { ?><div class="row"> <?php } ?>
    
    			<div <?php echo $section_id;?>class="template-page <?php echo $main_tpl_classes; ?>">
    				<div class="wrap-content">

    on Line 20 after </div><!--end main-page-template-->

    or would there be anything else I’d need to do?

    I’m working without an net on a live site (tsk tsk) 🙂 so I just don’t want to screw it up.

    Thanks.

    in reply to: Oh my Gosh, not another kleo_somewhere question #70654
     mitchcan
    Participant
    This reply has been set as private.
     mitchcan
    Participant

    OK, first, that’s hilarious. This entire time I’ve been specifically trying NOT to place it on home, thinking home meant, well, you know, Home (as in Front Page) vs Posts. In my last theme, I didn’t mess with the reading settings, it was built to overtake the Your Latest Posts setting. So I missed that info. Thanks.

    But back to the strategy of placing it via the widgets setup.

    My rationale, possibly flawed as usual, 🙂 was that I often use multiple widgets in each of the widget ‘areas’ I created in kleo_before_content, kleo_before_main etc, then I use Dynamic Widgets plugin to determine the display of each widget.

    In using the Rev Slider php directly, I don’t want to lose the ability to still use that widget ‘area.’

    I’m no php guy, but can I still make that happen by doing something like

    COPY CODE
    add_action('kleo_before_main_content','kleo_top_main_content');
    function kleo_top_main_content() {
        if (is_home()) {
            echo '<div id="before-main-content">', putRevSlider( "featured-posts" ), '</div>';
    }
    else 
    {
    echo '<div id="before-main-content">', do_shortcode('[widgets_on_pages id="wop-3"]'), '</div>';  //could put shortcode here
       }
    } 

    I have no clue if that is structurally correct, but conceptually, would something like that work to allow me to still have the ‘wop-3’ widget area functional?

    Thanks for setting me straight on some of the usage here.

    Have a great weekend!

    in reply to: Remove PMP roles from BuddyPress members page #54672
     mitchcan
    Participant

    You know, I should probably show the code I was using… that might be helpful. 🙂

    COPY CODE
    /*
     * Hide certain membership levels in BuddyPress directory
     */
    function my_bp_has_members($has_members, $members_template) {
    
        global $members_template;
    
        //pmpro membership levels to hide
        $levels = array(1,2,3);
    
        //get list of members
        $members = $members_template->members;
    
        foreach($members as $key=>$member) {
            if(pmpro_hasMembershipLevel($levels, $member->id))
                unset($members_template->members[$key]);
        }
        return $has_members;
    }
    add_filter('bp_has_members', 'my_bp_has_members', 10, 2);
    
    in reply to: Adding advertising areas in header using a widget #47470
     mitchcan
    Participant

    LOL. My bad, I should have explained that better… I already had that opening code on the page. 🙂

    I wouldn’t add that *twice* would I? I already had this… then I added the other below it.

    COPY CODE
    
    <?php
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */
    
    /* this added a sidebar above content below header - but likely only works on Kleo pages */
    add_action('kleo_before_main','display_advertising');
    function display_advertising() {
    	echo '<div id="my_ads">', do_shortcode('[widgets_on_pages id="wop-2"]'), '</div>';  //you could put a shortcode here if you want, too.
    }

    Do I need to do something different?

    Thanks.

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

Log in with your credentials

Forgot your details?