Using wordpress functions in class and change my code to OOP PHP

Thank you guys for all the suggestions and answers. I have fixed it, see my code below: class advanza_form { // Class properties defined using PHP Coding Guidelines and taking security measures: http://www.php.net/manual/en/language.oop5.visibility.php public $site_id; public $affiliate_id; public $redirection; protected $url; private $response; private $header; // For debugging public $status_code; // For debugging public function … Read more

Grouping posts by date

<?php $day_check = ”; while (have_posts()) : the_post(); $day = get_the_date(‘j’); if ($day != $day_check) { if ($day_check != ”) { echo ‘</ul>’; // close the list here } echo get_the_date() . ‘<ul>’; } ?> <li><a href=”#”><?php the_time(); ?><?php the_title(); ?></a></li> <?php $day_check = $day; endwhile; ?> do like this i hop this work

Custom Bulk Actions handler not firing

Hi first fix your condition if ( $action !== ‘out_of_stock’ || $action !== ‘in_stock’) { this condition will always run because your action is in contrast with “out_of_stock” or “in_stock”. So I think if you change the condition from OR to AND it will work. Then find out if the screen id is the one … Read more

How to delete specific element when it is not homepage?

If I’m understanding correctly, and the code you posted is the full contents of your post, one option would be to only keep the paragraph in the main content, and add the link as custom postmeta. You would then create a child theme and edit whichever places you want links – front-page.php for the homepage, … Read more