rbove
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: Display Child Pages, title and excerpt on to homepageI feel like I’m getting closer, this is what I have so far. I just need this loop to work.
<?php //get children of page 37 $args=array( 'post_parent' => 37, 'post_type' => 'page', ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); echo '<h3>' . get_the_title() . '</h3>'; echo '<p>' . get_the_excerpt() . '</p>'; endwhile; } wp_reset_postdata();?> <a href="#" class="button">Read More</a> <div class="ext_box program"> <figure></figure> <div> <ul class="list1"> <li><a href="#">Networking </a></li> <li><a href="#">Criminal Justice </a></li> </ul> </div> </div> </li> <li> <?php $my_query2 = null; $my_query2 = new WP_Query($args); if( $my_query2->have_posts() ) { while ($my_query2->have_posts()) : $my_query2->the_post(); echo '<h3>' . get_the_title() . '</h3>'; echo '<p>' . get_the_excerpt() . '</p>'; endwhile; } wp_reset_postdata();?> <a href="#" class="button">Read More</a> <div class="ext_box program"> <figure><img src="<?php bloginfo('template_directory'); ?>/images/1page_img2.jpg" class="img" alt="" /></figure> <div> <ul class="list1"> <li><a href="#">Link 1 </a></li> <li><a href="#">Link 2 </a></li> <li><a href="#">Link 3 </a></li> </ul> </div> </div> </li>
Forum: Fixing WordPress
In reply to: display content and title of child pages – HORIZONTALLYI’m looking for something like this, but to display the title and excerpt of as many pages as I want.
<ul> <li> <?php // The Query $the_query = new WP_Query( $args ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); echo '<li><h3>' . get_the_title() . '</h3></li>'; endwhile; /* Restore original Post Data * NB: Because we are using new WP_Query we aren't stomping on the * original $wp_query and it does not need to be reset. */ wp_reset_postdata(); ?> This is specialized training in criminal procedure, trial procedure, and investigation for Judges from Hangzhou Province China.<br> <a href="#" class="button">Read More</a> <div class="ext_box program"> <figure></figure> <div> <ul class="list1"> <li><a href="#">Networking </a></li> <li><a href="#">Criminal Justice </a></li> </ul> </div> </div> </li> <li><?php /* The 2nd Query (without global var) */ $query2 = new WP_Query( $args2 ); // The 2nd Loop while( $query2->have_posts() ): $query2->next_post(); echo '<li>' . get_the_title( $query2->post->ID ) . '</li>'; endwhile; // Restore original Post Data wp_reset_postdata(); ?> Footwear imprints have historically been found at all types of crime scenes from homicides, sexual assaults, to burglaries.<br> <a href="#" class="button">Read More</a> <div class="ext_box program"> <figure><img src="<?php bloginfo('template_directory'); ?>/images/1page_img2.jpg" class="img" alt="" /></figure> <div> <ul class="list1"> <li><a href="#">Link 1 </a></li> <li><a href="#">Link 2 </a></li> <li><a href="#">Link 3 </a></li> </ul> </div> </div> </li> <li> <?php /* The 3rd Query (without global var) */ $query3 = new WP_Query( $args3 ); // The 3rd Loop while( $query3->have_posts() ): $query3->next_post(); echo '<li>' . get_the_title( $query3->post->ID ) . '</li>'; endwhile; // Restore original Post Data wp_reset_postdata(); ?> Crime scene investigation and reconstruction is important to any law enforcement agency. This basic crime scene course is being taught by the Henry C. Lee Institute of Forensic Science.<br> <a href="#" class="button">Read More</a> <div class="ext_box program"> <figure><img src="<?php bloginfo('template_directory'); ?>/images/1page_img3.jpg" class="img" alt="" /></figure> <div> <ul class="list1"> <li><a href="#">Link 1 </a></li> <li><a href="#">Link 2 </a></li> <li><a href="#">Link 3 </a></li> </ul> </div> </div> </li>
Forum: Fixing WordPress
In reply to: display content and title of child pages – HORIZONTALLYwhen the content is displaying it just puts in a smaller column. I’d like the content to be put into three separate columns.
Forum: Themes and Templates
In reply to: wp_nav_menu, CSSI figured this out: I had to add menu_class’ => ‘sf-menu’
<?php wp_nav_menu(array( 'theme_location' => 'main_menu' , 'menu_class' => 'sf-menu')); ?>
Thanks!
-RobForum: Themes and Templates
In reply to: wp_nav_menu, CSSI do see the difference now, any ideas on how to get the function to spit out the right code to make this work?
Thanks for your time!WordPress:
<header> <h1><a class="logo" href="index.html">University</a></h1> <nav> <div class="menu-main-nav-menu-container"><ul id="menu-main-nav-menu" class="menu"><li id="menu-item-25" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-25"><a href="https://publix.newhaven.edu/hlee-test/?page_id=15">Programs</a></li> <li id="menu-item-24" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-24"><a href="https://publix.newhaven.edu/hlee-test/?page_id=17">Training Center</a></li> <li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-23"><a href="https://publix.newhaven.edu/hlee-test/?page_id=18">Research</a></li> <li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22"><a href="https://publix.newhaven.edu/hlee-test/?page_id=19">About</a></li> <li id="menu-item-21" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-21"><a href="https://publix.newhaven.edu/hlee-test/?page_id=20">Contact</a></li> </ul></div> </nav> <div class="clear"></div> </header>
HTML:
<header> <h1><a class="logo" href="index.html">University</a></h1> <nav> <ul class="sf-menu"> <li><a href="file:///Users/Bove/Creative/Work/UNH/HCLee/site/programs.html">Programs/Courses</a></li> <li><a href="#">Training Center</a></li> <li><a href="#">Research</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </nav> <div class="clear"></div> </header>
Viewing 5 replies - 1 through 5 (of 5 total)