How to pass parameter to another url?

Use a query string when you link to job-description.php, so you’d have links like this: job-description.php?job_id=1 job-description.php?job_id=2 job-description.php?job_id=3 etc. In job-description.php, then you can use $_GET to get the job_id. Make sure to sanitize it since it’s in the URL and could be changed by a devious person. I’d get the value for job_id and … Read more

how to indicate on post listing title if user already liked this post

Judging by the code for that like system, you should be able to find out if the user has liked the post like this: if ( is_user_logged_in() ) { $likes = get_user_meta( get_current_user_id(), ‘_liked_posts’, true ); if ( is_array( $likes ) && in_array( get_the_ID(), $likes ) ) { echo ‘<span class=”liked”>Liked</span>’; } } That will … Read more

index.php file keeps redirecting to a non-existent index.html file?

“Redirect” from index.php to index.html might be caused by your apache settings. If you have index.html before index.php in your apache config file and you have both of these files in your folder, it will go for the index.html. Try to add this to your .htaccess file (index.php preferred over index.html) DirectoryIndex index.php index.html or … Read more