How to return site_url() without https://
Try below method $site_url = site_url(); $url = preg_replace(“(^https?://)”, “”, $site_url ); return $url;
Try below method $site_url = site_url(); $url = preg_replace(“(^https?://)”, “”, $site_url ); return $url;
You could try using the enclosing form to write the shortcode and make use of the $content returned variable. You need to declare you short code function with the extra parameter: function transciptor( $atts=””, $content ) { and then write your shortcode as: [transcript] place the value that will be passed to $content here [/transcript] … Read more
In your example {{image-about}} tells WordPress to use the image defined in [‘attachments’][‘image-about’] as the thumbnail for those posts in the ‘starter content’. This functionality is specific to the “Starter Content” feature added in WordPress 4.7, which is described here, and not a PHP language feature.
The malware stores an array of PHP fragments to execute at the bottom of its own file, delimited and encoded using the MD5 hash of the filename. It has a specific GUID to control it; on start up it checks all POST and cookie values for properly-encoded commands: PHP serialized arrays, XORed with both the … Read more
Because you’re using Composer, none of the normal methods of providing child theme support apply. For a theme that doesn’t use composer, you can allow a child theme to replace a file by including it using the get_theme_file_path() function. So in functions.php, instead of: require_once ‘Core\Utilities\Gallery.php’; You would use: require_once get_theme_file_path( ‘Core\Utilities\Gallery.php’ ); get_theme_file_path() will … Read more
This is because the_post_thubmnail() outputs an <img> tag. So the result of your code will be something like this: <div class=”bio-picture”> <img url=”<img src=”https://wordpress.stackexchange.com/questions/366208/thumbnail/image/url.jpg” class=”wp-post-image attachment-full”>” class=”headshot”> </div> Your screenshot is how the browser has chosen to handle that broken HTML. If you want to output the post thumbnail <img> with a custom class, use … Read more
This doesn’t seem to have anything to do with WordPress, but the problem is simple: You’re still using $_POST[‘quantity’] outside of isset(). You’re checking isset() here: if(isset($_POST[‘quantity’])) { $quantityinstock = $_POST[‘quantity’]; } But then you’re immediately using it without the check anyway: $quantityinstock = $dbConn->escape_string($_POST[‘quantity’]); You should not be using $_POST[‘quantity’] without a check for … Read more
Maybe your form has a float property. So just add overflow hidden to parent div. Take a look here: https://codepen.io/zecka/pen/jObvbmG your code can be like that: <div style=”border: 3px solid green; margin-top: 1em; height: auto; overflow: hidden”> <h2>Blog notifications</h2> <?php echo do_shortcode(‘[forminator_form id=”9979″]’); ?> </div>
If the user does not exist then your template should return something to say that the user does not exist instead of attempting to echo out their data, example: <?php $keyuser = get_user_by(‘login’, $username); ?> <?php if(empty($keyuser)): ?> <p>That username does not exist, please check for typos or try a different search cryteria.</p> <?php else: … Read more
This can be achieved multiple ways. One of them is to filter term link with your desired structure. Following is a function that can convert a term link as per your structure. Ignore the first argument, it is there as we will be using this function as a filter callback. /** * @param string $termlink … Read more