Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • I see a date range has been added to the plugin description but it’s not in the files

    Thread Starter datoshway

    (@datoshway)

    No, it’s still the wrong date, now it’s pulling from block number 1 instead of 2 when it should be pulling 3

    Thread Starter datoshway

    (@datoshway)

    strangely enough, that gave me the date previous to the one it was originally giving me.

    Thread Starter datoshway

    (@datoshway)

    Thanks for sending that over. I gave that a try and it’s throwing the following error:

    Fatal error: Function name must be a string

    Thread Starter datoshway

    (@datoshway)

    707 is the id of the page i’m pulling the excerpt, title and date from. But for some reason my code is pulling the date from the post/query next to it. Which are posts, this block has it’s own query because it’s pulling a particular page.

    Thread Starter datoshway

    (@datoshway)

    hmm. Thats all I have pertaining to $my_post. Below is everything above the query

    <?php $home_page_builder = $data['home_page_builder']['enabled'];
    if ($home_page_builder){
    
        foreach ($home_page_builder as $key=>$value) {
    
            switch($key) {
    
                case 'portfolio':
    
                    if( $data['portfolio_home_style'] == "style1" ){
                    ?>
    
                        <div class="portfolio_home">
    
                            <div class="container">
    
                                <?php if ( $data['portfolio_home_title'] || $data['portfolio_home_text']): ?>
                                <div class="page_desc">
                                    <?php
                                    if( $data['portfolio_home_title'] ) echo "<h2>".$data['portfolio_home_title']."</h2>";
                                    if( $data['portfolio_home_text'] ) echo "<p>".$data['portfolio_home_text']."</p>";
                                    ?>
                                </div>
                                <?php endif ?>
    
                                <ul class="clearfix"> 
    
                                    <?php
                                    $args=array(
                                        'post_type'      => 'portfolio',
                                        'post_status'    => 'publish',
                                        'posts_per_page' => $data['portfolio_home_posts_per_page'],
                                        'paged'          => $paged
                                    );
    
                                    $wp_query = new WP_Query($args);
                                    if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post();  
    
                                    if(has_post_thumbnail($post->ID, 'large')){$img_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');}
                                    $image = aq_resize( $img_url[0], 410, 300, true );
    
                                    $project_type = ( get_post_meta( $post->ID, '_bmd_project_type', true ) );
                                    ?>
    
                                    <li>
    
                                        <img src="<?php echo $image; ?>" alt="<?php echo get_the_title(); ?>"/>
    
                                        <?php
                                        if ( $project_type == 'image' || $project_type == 'slider' ) $p_class = "plus";
                                        if ( $project_type == 'vimeo' || $project_type == 'youtube' ) $p_class = "play";
                                        ?>
    
                                        <a href="<?php echo get_permalink(); ?>" title="<?php echo get_the_title(); ?>" class="<?php echo $p_class ?>"></a>
                                        <h2 class="title"><?php echo get_the_title(); ?></h2>
    
                                    </li>
    
                                    <?php endwhile; endif; ?>
    
                                </ul>
    
                            </div>
                        </div><!-- end .portfolio_home -->
                    <?php
                    }
    
                    if( $data['portfolio_home_style'] =="style2" ){
                    ?>
                        <div class="portfolio_home2">
                            <div class="container">
    
                                <?php if ( $data['portfolio_home_title'] || $data['portfolio_home_text']): ?>
    
                                <div class="page_desc">
                                    <?php
                                    if( $data['portfolio_home_title'] ) echo "<h2>".$data['portfolio_home_title']."</h2>";
                                    if( $data['portfolio_home_text'] ) echo "<p>".$data['portfolio_home_text']."</p>";
                                    ?>
                                </div>
                                <?php endif ?>
    
                                <div class="row">
                                    <ul  class="portfolio_post">
                                        <?php
    
                                        $args=array(
                                            'post_type'      => 'portfolio',
                                            'post_status'    => 'publish',
                                            'posts_per_page' => $data['portfolio_home_posts_per_page'],
                                            'paged'          => $paged,
                                        );
                                        $wp_query = new WP_Query($args);
    
                                        if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post();  
    
                                        if(has_post_thumbnail($post->ID, 'full')){$img_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');}
    
                                        if( $data['portfolio_home_col'] == 'col2' ) {
                                            $image = aq_resize( $img_url[0], 570, 400, true );
                                            $p_class = "span6";
                                        }
                                        if( $data['portfolio_home_col'] == 'col3' ) {
                                            $image = aq_resize( $img_url[0], 570, 400, true );
                                            $p_class = "span4";
                                        }
                                        if( $data['portfolio_home_col'] == 'col4' ) {
                                            $image = aq_resize( $img_url[0], 370, 300, true );
                                            $p_class = "span3";
                                        }
    
                                        $project_type = ( get_post_meta( $post->ID, '_bmd_project_type', true ) );
                                        ?>
    
                                        <li class="<?php echo $p_class ?>">
    
                                            <div class="portfolio_img">
                                                <img src="<?php echo $image; ?>" alt="<?php echo get_the_title(); ?>"/>
    
                                                <?php
                                                if ( $project_type == 'image' || $project_type == 'slider' ) $p_class = "plus";
                                                if ( $project_type == 'vimeo' || $project_type == 'youtube' ) $p_class = "play";
                                                ?>
    
                                                <a href="<?php echo get_permalink(); ?>" title="<?php echo get_the_title(); ?>" class="<?php echo $p_class ?>"></a>
                                            </div>
    
                                            <?php
                                            if( $data['portfolio_home_show_title'] == 'on' || $data['portfolio_home_show_cat'] == 'on' ){
    
                                                if ( $data['portfolio_home_show_cat'] == 'off') $h_class = "no_margin";
    
                                                echo '<div class="portfolio_desc">';
                                                if( $data['portfolio_home_show_title'] == 'on' ) echo '<h2 class="title '.$h_class.'"><a href="'.get_permalink().'">'.get_the_title().'</a></h2>';
                                                if( $data['portfolio_home_show_cat'] == 'on' ) {
                                                    echo '<span>';
                                                    echo get_the_term_list( $post->ID, 'portfolio-category', '', ' - ', '', 0 );
                                                    echo '</span>';
                                                };
                                                echo '</div>';
    
                                            } ?>
    
                                        </li>
    
                                        <?php endwhile; endif; ?>
                                    </ul><!-- end .portfolio_post -->
                                </div>
                            </div>
                        </div>
                    <?php
                    }
                break; 
    
                case 'blog':
                ?>
    
                            <?php if ( $data['blog_home_title'] || $data['blog_home_text']): ?>
                          <div class="page_desc">
                                <?php
                                if( $data['blog_home_title'] ) echo "<h2>".$data['blog_home_title']."</h2>";
                                if( $data['blog_home_text'] ) echo "<p>".$data['blog_home_text']."</p>";
                                ?>
                          </div>
                            <?php endif ?>
    
                            <div class="row">
    
                                <?php
                                $args=array(
                                    'post_type' => 'post',
                                    'post_status' => 'publish',
                                    'posts_per_page' => 2,
                                    'paged' => $paged,
                                );
                                $wp_query = new WP_Query($args);
                                if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post();
                                ?>
    
                                <article id="post-<?php the_ID(); ?>" <?php post_class('span4'); ?>>
                                    <?php get_template_part( 'content-home', get_post_format() ); ?>
                                </article>
    
                                <?php endwhile; endif; ?>
    
          <article id="post-678" class="post-678 post type-post status-publish format-standard hentry category-401k tag-50-employees tag-aca tag-fiscal-cliff tag-obamacare span4">                    
    
                             <?php
    $post_id = 707; // substitute the actual post ID for "2"
    $my_post = get_post($post_id);
    
    echo "<div class='date'>";
    
    echo "<span class='month'>";
    the_time('M');
    echo "</span>";
    
    echo "<span class='day'>";
    the_date('d');
    echo "</div>";
    
    echo "<div class='blog_post_content'>";
    
    echo "<h2 class='title'>Case Study: $my_post->post_title</h2>";
    echo "<p>$my_post->post_excerpt</p>";
    
    echo "<a href='?page_id=707 ' class='read_more'>Continue reading...</a>";
    
    echo "</div>";
    
    ?>
    Thread Starter datoshway

    (@datoshway)

    So freakin confused, i’m just not seeing anything of what I need here. This is what I need to do. Feed a title and one image from my posts. Where do I start? wp-atom.php has practically nothing in it.

    Thread Starter datoshway

    (@datoshway)

    Also buddy press seems to have alot of other stuff, is there a way to just have a simple gallery with that

    Thread Starter datoshway

    (@datoshway)

    Ok cool, Ill check it out, which plug in?

    Forum: Plugins
    In reply to: Ads
    Thread Starter datoshway

    (@datoshway)

    Forum: Plugins
    In reply to: Category Pages
    Thread Starter datoshway

    (@datoshway)

    Anyone know? Just looking to be able to post to a certain page, seems pretty elementary.

    Thread Starter datoshway

    (@datoshway)

    sorry double posted. close this

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