Static posts page is not working

When you use “static front page” are you selecting the actual page you want displayed on the home page? It sounds like you want the “Splash” page as the home page. You should create the Splash page in the Page Edit Screen, select a custom page template if that is what you’re wanting to use … Read more

$_html is empty when var dumped

so I turn to you guys to help me see what I am doing wrong here. First thing your doing wrong is over complicating a simple effective API. Your code makes no sense. Your mixing functions that echo output with arbitrary html mark up that gets assigned to a non existing class property that nothing … Read more

What function does the loop of displaying posts?

The loop http://codex.wordpress.org/The_Loop Here’s a standard loop you can customize using WP_Query. <?php // The Query $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { echo ‘<ul>’; while ( $the_query->have_posts() ) { $the_query->the_post(); echo ‘<li>’ . get_the_title() . ‘</li>’; } echo ‘</ul>’; } else { // no posts found } … Read more

Pagination not working properly

Don’t use query_posts in the template. If you delete that line, your template will paginate correctly. If you want to alter the main query, use the pre_get_posts action. Currently, your query overwrites the default main query, and you don’t set any pagination parameters within the query, so you’re always going to get the first 10 … Read more

Creating mixture of shortcodes to use in the visual/text editor

I suggest to just append the other things to the content without editing the templates add_filter(‘the_content’,’hang_my_specific_things_on_the_content’); function hang_my_specific_things_on_the_content($content) { // shortcode0 is appended before content $content = do_shortcode(‘[shortcode0]’).$content; // these are appended after the content $content .= do_shortcode(‘[shortcode1]’); $content .= ‘<img src=”https://wordpress.stackexchange.com/questions/312880/someimage.png” />’; $content .= do_shortcode(‘[shortcode2]’); return $content; }

Get all active posts that are tied to a custom taxonomy for a custom post type

Here’s how I fixed it.. <!–faq page –> <div class=”faq”> <?php get_template_part(‘./template/global/breadcrumbs’); ?> <h3><span><?php the_title(); ?></span></h3> <?php $categories = get_categories(‘taxonomy=faqcat&order=DESC’); foreach ($categories as $cat) { $i = 0; ?> <div class=”faq-title”> <h2><?php echo $cat->name; ?></h2> </div> <?php $answers = new WP_Query(array(‘post_type’ => ‘faq’, ‘tax_query’ => array(array(‘taxonomy’ => ‘faqcat’, ‘field’ => ‘id’, ‘terms’ => $cat->term_id,),),)); if … Read more