Posts page (category) layout modification, which php file change?
Posts page (category) layout modification, which php file change?
Posts page (category) layout modification, which php file change?
From the provided error, it appears you have added in some custom code to your functions.php file in your theme. Suggest commenting out the last changes you made, but the error is clearly stating that line 50 is the culprit so that would be a good starting point if you’re unsure. If this has happened … Read more
I wouldn’t recommend doing this Tchai. The whole point of a CMS is to make editing your site simple. If you’re determined to do this, I would go to tools > export and export the page or post data. This will give you an XML feed with all of the posts data on it. You … Read more
The uploaded file exceeds the upload_max_filesize directive in php.ini. showing while uploading a theme
Ok so after much head scratching and log diving I realised the issue here. The site is a multi-vendor site and the connection to the vendor is with live keys. So although it creates a customer in test, it then tries to charge the user ‘x’ amount to the vendor with the vendors live test … Read more
There are lots of solutions to redirect from the old post URL to the new post URL. You can install a plugin “Safe Redirect Manager” and set it from the admin panel. You can write some snippet in the functions.php file as: add_action(‘template_redirect’, ‘post_redirect_by_custom_filters’); function post_redirect_by_custom_filters() { global $post; // this array can contain category … Read more
Use get_cat_ID(‘categoy name’) https://developer.wordpress.org/reference/functions/get_cat_id/ <?php $category_id = get_cat_ID(‘Category Name’); if($category_id > 0){ echo ‘category exists’; }else{ echo ‘category NOT exists’; } ?>
If you want the image URL you should use wp_get_attachment_image_url(), not wp_get_attachment_image(): $background_image_id = get_post_meta(get_the_ID(), ‘your_background_image_id’, true); $background_image = wp_get_attachment_image_url( $background_image_id, ‘full’ ); $profile_image_id = get_post_meta(get_the_ID(), ‘your_profile_picture_id’, true); $profile_image = wp_get_attachment_image_url( $profile_image_id, ‘full’ ); ?> wp_get_attachment_image() returns a full HTML <img> tag, but background images are just a URL.
hide theme files for admin beneath root
1.) First, when creating a shortcode, you must return data, not print. 2.) Yes, you must explicitly specify the post id, print the id in the button or form of your shortcode, you can also use the shortcode attributes to generate a button for a specific post (See example) Your shortcode code should be like … Read more