Theme Option not Working Inside a Function

1) Move the function to the functions.php file, that’s where it belongs. Put it at the end before any closing ?>: function my_theme_navigation() { global $shortname; if( get_option( $shortname . ‘_next_prev_or_paginate’ ) == ‘Next’ ) : // the block for next-prev navigation previous_posts_link (‘Newer’); next_posts_link(‘Older’); else : // the block for pagination global $wp_query; $big … Read more

How to get my loop to paginate?

In functions.php function my_theme_navigation() { global $shortname; if( get_option( $shortname . ‘_next_prev_or_paginate’ ) == ‘Next’ ) : // the block for next-prev navigation echo ‘<div style=”float:left”>’; next_posts_link(‘Older’); echo ‘</div>’; echo ‘<div style=”float:right”>’; previous_posts_link (‘Newer’); echo ‘</div>’; else : // the block for pagination global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( … Read more

/tag/tag_name/page/2 gives a 404 error

The current page number is set by the main query, not by your embedded sub-query. Also, you really should not create a second query, alter the main query instead with a filter on pre_get_posts. add_filter( ‘pre_get_posts’, ‘add_custom_type_to_tag_archive’ ); function add_custom_type_to_tag_archive( $query ) { if ( ! is_main_query() or ! is_tag() ) return $query; $query->set( ‘post_type’, … Read more

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