Only allow posts with a specific term to only be viewed by other authors with the same term in their post

You’d do something like $current_user = wp_get_current_user(); to get the current user, then you’d want their posts $current_user_posts = get_posts(array( ‘author’ => $current_user->ID, ‘posts_per_page’ => -1 ); with their posts, you’d cycle through them, and grab the terms $current_user_terms = array(); foreach ($current_user_posts as $user_post) { $user_terms = wp_get_post_terms($user_post->ID, ‘custom_tax’, array(“fields” => “ids”)); foreach ($user_terms … Read more

How to add html code at the bottom of the post in archive page?

Open archive.php from your theme’s directory the code will look like this <?php /* Template Name: Archives */ get_header(); ?> <div id=”container”> <div id=”content” role=”main”> <?php the_post(); ?> <h1 class=”entry-title”><?php the_title(); ?></h1> <?php get_search_form(); ?> <h2>Archives by Month:</h2> <ul> <?php wp_get_archives(‘type=monthly’); ?> </ul> <h2>Archives by Subject:</h2> <ul> <?php wp_list_categories(); ?> </ul> </div><!– #content –> </div><!– … Read more

Image behind the post’s title

The image you are referring to is set via your themes style.css file and not via the WordPress admin or in your theme options. You can find the file here: http://promisingcoins.com/wp-content/themes/structural/style.css Here is the CSS that is used for this section (line #1305): .breadcrumb { background: url(images/breadcrumb.png); position: relative; text-align: center; padding: 60px 0px; margin-top: … Read more

$_GET parametters not working in an specific template

WordPress is removing all unknown (not registered) $_GET parameters while processing the request (same is true for $_POST). You can either register the custom variable, or just go the canonical PHP way by using filter_input(). This will access the original, unchanged GET parameters. If you are using filter_input(), you have to hook into pre_get_posts to … Read more