Bad theme code – can you find the error?

OK, I’m just going to list things out as I go through. Some of what follows is stylistic feedback, some is security related, some is functional: <div class=”home-featured-block”> <?php $featured_block=$profitmag_settings[‘featured_block_one’]; $no_of_block=$profitmag_settings[‘no_of_block_one’]; I don’t know what the $profitmag_settings variable looks like, but either of these parameters could be unset. Instead of just assuming they exist, you … Read more

Where to put include php file?

First of all I must say that I don’t think this is a wordpress related question. That said I hope this following suggestion helps you go in the right direction… Basically the include(“xxx-xxx.php”); already tells you where to put the xxx-xxx.php – in this case it should go into the same directory where the ‘parent’ is … Read more

Simple Redirect but getting the right code?

Change line 1323 of your screenshot with the following: <li><a href=”https://wordpress.stackexchange.com/questions/127615/<?php echo bbp_get_user_profile_url( get_current_user_id() );?>”>Your Profile</a></li> You can change “Your Profile” with different text if you like.

I want to add the alt attribute to all the photos!

If your current code manages all blocks with images replacing usage wp_get_attachment_image_src with output of hardcoded img tag, with echo wp_get_attachment_image() which will return img tag as string with default alt of image or empty if non set will work. Below is your code updated with idea described. <?php class home_main_post_below_list extends AQ_Block { //set … Read more

feed url problem

Don’t know if this is your only issue, but you’re using the_title() to build your URI. This ECHOS the title, which is not what you want. Instead, you should be using get_the_title(). I’d also urlencode the title, as Jan suggested. Your best bet is to print out the YouTube URI after you build it, then … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)