Whats wrong with my code? Need To add String to shortcode? [closed]

$special_id = ‘ . do_shortcode(‘[url_path_number]’)’ ; Is completely wrong. do_shortcode() is a function and shouldn’t be inside quotes, because that just makes a string that says “do_shortcode()”. I don’t even know what you’re trying to do with the dot at the beginning. $special_id = do_shortcode(‘[url_path_number]’); Is correct.

Displaying categories

get_the_category_list works on The Loop only and needs a post_id as a parameter. As a page does not have category, it won’t work by default in a page. If you want to retrieve all the categories on a page, you should use one of the following: wp_list_categories get_categories( array( ‘echo’ => false ) );

How would I split the results into two columns [closed]

Something like this should work though I havent testested it: PHP: <?php $inputs=”<ul class=”checkbox-columns”>”; foreach($subjects as $subject){ $inputs .= ‘<li><label><input type=”checkbox” name=”subjects[]” value=”‘ . $subject[‘subject’] . ‘”/>’ . $subject[‘subject’] . ‘</label></li>’; } $inputs .= ‘</ul>’; echo $inputs; CSS: .checkbox-columns { width: 200px; } .checkbox-columns li { display: block; float: left; width: 50%; } This creates … Read more

Can I have a php site on subdirectory of WordPress?

Technically, it’s possible. And it works. You could have a PHP site on a sub-directory like example.com/shop. But, a better practice is to host that PHP site on a sub-domain like shop.example.com. It helps in better maintenance and provides a better structure for organizing the site. On a Nginx server, your config should be something … Read more

Warning: Cannot modify header information

Well, the error says exactly what’s going on. You’re outputting content, before the data is finished being manipulated. It’s like you’re trying to echo something but WordPress still has to do some stuff and it’s telling you “No, no, let me do my thing first”. You’re calling the echo too early. In short, you’re 99% … Read more

php 7.0 update to 7.1 and at least 7.2

Many plugins have an ’empty’ index.php that doesn’t do anything; the plugin code is elsewhere. But you need to contact the plugin’s author/support to get a definitive answer.