jQuery cycle and WordPress: Captions, buttons, oh my

First: You should use an IDE like “Eclipse” or “PhpFireStorm”. Second: Re-reading your code is always a good advice – what’s missing in the next line? <img alt=”<?php the_title(); ?> image”https://wordpress.stackexchange.com/questions/26142/<?php echo get_post_meta($post->ID,”img_url’, true); ?” /> Third: You need to state global $post; at the beginning of your file, before you can access the provided … Read more

Implement “No related posts for this entry” into the loop?

I still can’t see how the code and the problem is substantially different from your original topic; however, try to add your text into the typical ‘else’ location for a loop if no posts are found; change this line: <?php endwhile; endif; ?> to: <?php endwhile; else : echo ‘<h3 class=”no-related-posts”>sorry but there are no … Read more

Custom Page Template and Category Exclusion

Try this code in your template. <?php /** * Template Name: Exclude Comic Category */ get_header(); ?> <div id=”primary”> <div id=”content” role=”main”> <?php query_posts( array( ‘category_name’ => ‘comic’, ‘paged’ => get_query_var(‘paged’), ‘posts_per_page’ => 5 ) ); ?> <?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( ‘nav-above’ ); ?> <?php while ( have_posts() ) : … Read more

Applying a filter to multiple loops for days ago

Define the filter_where function in your functions.php file in your theme. <?php function filter_where($where=””) { $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘-30 days’)) . “‘”; return $where; }

posts_nav_link() not working on index.php

You are missing the paged= paramter. $myquery = new wp_query(‘cat=-41&paged=’ . get_query_var( ‘page’ )); Codex Note – You should set get_query_var( ‘page’ ) if you want your query to work with pagination. Tip – If you want to eclude a category from main page you can use the pre_get_post filter. That is better way to … Read more

How to exclude certain portfolios from a loop

so I am thinking your $arg would be: $args = array( ‘numberposts’ => $portfolio_items, ‘order’ => $portfolio_sort, ‘orderby’ => ‘date’, ‘post_type’ => array(‘portfolios’), ‘offset’ => $offset, ‘exclude’ => ‘1,2’, ); And that would exclude post 1 and 2. But a better option that you should do, is to just create a featured category for your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)