What is proper way to use the php if statement? [closed]

I assume you are trying to create a new template file linked to a WordPress page. Additionnal documentation : https://codex.wordpress.org/Theme_Development#Basic_Templates To make so, you would need to do something like this : <?php /* Template Name: My first template file */ get_header(); ?> <!– Main body –> <?php if (1<2) { echo “Add multiple lines … Read more

Two sites one PC

I think you are doing everything wrong. You should just use 1 WP installation and ENABLE MULTI-SITE feature, and then you can open as many separate WP sites as you want! NO NEED TO INSTALL separate WORDPRESS installations.

php grabbing every post made?

Based on WordPress template hierarchy, categories are displayed using the category.php template. So in other to display your preferred category, you’ll need to create a category.php file, and use the query below: $cat_query = new WP_Query( array( ‘post_type’ => ‘post’, ‘cat’ => $cat, //WordPress global for getting the current category ‘posts_per_page’ => 5, ) ); … Read more

Display biography post for today’s birthday person

Well there is no Generic solution for your problem/query as WordPress is not Specifically made Biography directory. Solution will depend on the approach you have followed. Have you created Custom User Role and add biography user under that user role OR Have you created Custom Post Type for Biography and add posts under that ? … Read more

Detecting IP Address of someone using ‘copy’ function [closed]

Here is a road map to do this. You should adjust this code to your exact requirements: You can detect copy event in JavaScript using this code in your page <script> jQuery(document).ready( function($) { function myFunction() { // here make an ajax call to send data to server $.ajax({ url: “http://yourwebsite.com”, type: ‘POST’, data: {‘copied’: … 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

WordPress portfolio pagination on home page

You can set the amount of posts to display in the admin panel under ‘Settings > Reading > Blog pages show at most .. posts’. If you want to style this afterwards, more information here: http://codex.wordpress.org/Pagination Or a useful plugin: https://wordpress.org/plugins/wp-paginate/