1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Newb here needing PHP help

Discussion in 'PHP & Perl' started by kingmitch, Apr 17, 2015.

  1. kingmitch

    kingmitch Junior Member

    Joined:
    Apr 16, 2015
    Messages:
    142
    Likes Received:
    24
    Occupation:
    High Class Gigolo If you gotta ask you can't affor
    Location:
    All Over Your Face
    The issue that I'm having is adding one of my plugrush widgets onto my blog between posts. If anyone could help me out that would be greatly appreciated.
     
  2. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,398
    Likes Received:
    2,072
    What CMS are you using? have you looked for a plugin that inserts ads above posts? If you are using WP, have you tried putting the cost into the post_loop?
     
  3. kingmitch

    kingmitch Junior Member

    Joined:
    Apr 16, 2015
    Messages:
    142
    Likes Received:
    24
    Occupation:
    High Class Gigolo If you gotta ask you can't affor
    Location:
    All Over Your Face
    I'm using wp. I've tried putting in the postloop but it doesn't show up. I'll show you what the code looks like for my index.php.
    Code:
    <?php get_header(); ?>
    
            <?php
                $myThemes_layout = new layout( );
                if( (int)get_option( 'page_for_posts' ) )
                    $p = get_post( get_option( 'page_for_posts' ) );
            ?>
    
            <div class="content">
                <div class="line title">
                    <h1><?php _e( 'Blog Page' , 'myThemes' ); ?></h1>
                    <?php if( isset( $p ) && isset( $p -> post_content ) && !empty( $p -> post_content ) ) { ?>
                        <p><?php echo $p -> post_content; ?></p>
                    <?php } ?>
                </div>
                <div class="line">
    
                    <section  class="<?php echo $myThemes_layout -> contentClass(); ?> list-view large-icons">
                        <?php
                            if( have_posts() ){
                                while( have_posts() ){
                                    the_post();
    <div class="pr-widget" id="pr-c5sh" style="height:184px;width:547px;"></div>
    
                                    get_template_part( 'cfg/templates/view/list-view' );
                                }
                            }
                            else{
                                echo '<h2>' . __( 'Not found results' , 'myThemes' ) . '</h2>';
                                echo '<p>' . __( 'We apologize but this page, post or resource does not exist or can not be found. Perhaps it is necessary to change the call method to this page, post or resource.' , 'myThemes' ) . '</p>';
                            }
    
                            get_template_part( 'cfg/templates/pagination' );
                        ?>
                    </section><?php    
                        /* SIDEBAR */
                        $myThemes_layout -> echoSidebar( );
                    ?>
                    <div class="clear"></div>
                </div>
            </div>
    
    <?php get_footer(); ?>

    "<div class="pr-widget" id="pr-c5sh" style="height:184px;width:547px;"></div>"
    this is the widget i'm trying to add is it in the wrong place?
     
  4. kingmitch

    kingmitch Junior Member

    Joined:
    Apr 16, 2015
    Messages:
    142
    Likes Received:
    24
    Occupation:
    High Class Gigolo If you gotta ask you can't affor
    Location:
    All Over Your Face
    Nvm I figured it out thanks anyway though.