How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?

You can use PHP’s includes like this: include dirname(__FILE__).’/components/authorSocials.php’; but you should remember about providing the data to your component. Since the idea is that you will you use it in different places, not always the default values will be available and will be the right ones, so you should add some more code to … Read more

Contact form code not working. Need help!

Copied from my Answer for “An old plugin self-made stoped sending mail”: Many E-Mail-Hosters changed their rules to prevent spam. Often times, E-Mails that have one domain name in their “from”-Tag and come from a server with a different domain are rejected. So my guess is, maybe the emails are still sent, but not received. … Read more

Unable to make shortcode, what is wrong?

That simply is too late for a shortcode. Just try putting it in your themes functions.php file. Aside from that, using shortcodes imo are not a good idea. When you decide to change it, it will still stay in the database. This means either going through all places in the DB to clean up the … Read more

Impossible to display modification in shortcode code?

I’m pretty sure it’s this line: $this->function = static::className().’::getCallBack’; I believe this is going to be the name of the abstract class. You may want to try get_called_class() or something similar. Try logging the $this->function to see what the name of the class is.

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