Unable to access wordpress page

There’s an error in the plugin Photo Gallery that your site is using. In order to fix this, you’ll have to deactivate or delete this plugin. In order to deactivate or delete this plugin, please follow the following steps: Log in to your website’s cPanel or use FTP to access your website’s files. Navigate to … Read more

Load info from customposttype into template page

You just need to put a query in your template. As an example, I use less conditions. You may add what is necessary later. // prepare arguments $args = array( ‘post_type’ => ‘members’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘post_status’ => ‘publish’, ); // create a query based on arguments $query = new WP_Query($args); while … Read more

Updating page template pragmatically

Use the body_class filter to change the <body> CSS classes. You can copy the same logic into your hooked function (like below), or make it neater by copying the logic into another new function and make this function return a boolean (and then use that new function with the body_class filter and within your template_redirect … Read more

Two different single.php depending on source page

You would use page templates to accomplish what you’re doing. If you specify a page-{slug}.php, it’ll use that one instead. It always does upward traversal. So if there’s a specific page, it’ll use it. If not, it’ll be one level more general. Copy the home.php PHP into your new one, and remove the calls for … Read more

small problem in the article ()

There’s two issues at play here. First, you’ve got two sets of parentheses: ↓ Here ↓ And Here echo ‘<div>(‘ . comments_number( ‘(0) ‘, ‘(1)’, ‘(%)’ ) . ‘)</div>’; You only want one. Second, you’re trying to concatenate a string (.) with a function, comments_number(), that echoes. This results in comments_number() being outut immediately, and … Read more