Alor Web
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to show one shortcode into anotherHi @ariyan0282,
You can try the code below and let me know if it works for you.
function custom_post_shortcode($atts) { // Extract shortcode attributes $atts = shortcode_atts( array( 'type' => 'content', 'id' => '', ), $atts, 'custom_post' ); // Check if [post_id] exists if (shortcode_exists('post_id')) { // Get the value of [post_id] $post_id = do_shortcode('[post_id]'); // Set the id attribute to the value of [post_id] $atts['id'] = $post_id; } // Use the attributes to generate the desired output $output = "[post type='{$atts['type']}' id='{$atts['id']}']"; return $output; } // Register the custom shortcode add_shortcode('custom_post', 'custom_post_shortcode');
Thanks
Forum: Fixing WordPress
In reply to: After updating database prefixHi @formanite22,
Since your website is working perfectly fine after all the updates you have made to your database, I think you can ignore that issue.
Thanks.
Forum: Fixing WordPress
In reply to: Installing plugin from uploaded file:Hi @jpl303,
Try to can access your website files using FTP.
Next, go to the folder /wp-content/plugins/ and try to delete the folder of the plugin that causes your website to crash. Now refresh your website.
Let me know how it goes.
ThanksForum: Fixing WordPress
In reply to: Proper way to replace an imageHi @chcw,
The recommended way is that you must rename the new image file differently from the older image file so that it will not cause a conflict.
If you want to maintain the filename for the new image, the solution is to permanently delete the old image and upload the new image to your website.
Try the recommended suggestion and let me know how it goes.
Thanks
Forum: Fixing WordPress
In reply to: WP-config.php Database change HelpHi @chukwithak,
Can you send a screenshot of the issue so that we could better looked at it?
ThanksHi @jproach,
Try to read this article on how to connect to FileZilla so that you can access your files.
https://docs.digitalocean.com/products/droplets/how-to/transfer-files/#configure-filezilla
Let me know how it goes.
Thanks.
Here is the updated code that displays your needed output.
function post_parent_category_slug_shortcode() { $category_ids = wp_get_post_categories(get_the_ID()); if (empty($category_ids)) { return 'No categories found'; } $categories = array_map('get_category', $category_ids); $category_names = array_map(function ($category) { return $category->name; }, $categories); return implode('/', $category_names); } add_shortcode( 'post_parent_category_slug', 'post_parent_category_slug_shortcode');
Let me know if it works.
ThanksHi @carlosvai,
Please try this update code and let me know if this is the result that you are looking for.function post_parent_category_slug_shortcode() { // get the current category IDs $category_ids = wp_get_post_categories(get_the_ID()); if (empty($category_ids)) { return 'No categories found'; } // get the current category objects $categories = array_map('get_category', $category_ids); // Display the names of all categories $category_names = array_map(function ($category) { return $category->name; }, $categories); return implode(' ', $category_names); } add_shortcode( 'post_parent_category_slug', 'post_parent_category_slug_shortcode');
If you any have questions and clarification, just let me know.
Thanks.Forum: Fixing WordPress
In reply to: Newly added Images are not displaying on frontend of websiteHello?@shreeeneblur,
I understand the frustration you must be feeling with the images not showing up on the front end, despite your efforts.
You can try the following suggestions below:
Increase the PHP memory limit.
- Access your website file using FTP.
- After that, locate the file “wp-config.php”
- Edit the file and add the following code below:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
- Save the file and refresh your website.
- Now, try to upload new images to your website.
Insufficient PHP memory can sometimes lead to issues with image uploads.
Try the following suggestion and let me know how it goes.
Thanks
Forum: Fixing WordPress
In reply to: How to add more rooms to the rooms listHi @seunjefferey37,
Given the link that you have to your website, I have noticed that you are using Kadence Themes. Am I right?
If yes, I would like to ask: how did you create the https://hasbapartments.com/rooms-list/?
Did you create this page using the Kadence Elements template?
Your response would be greatly appreciated.Thanks
Forum: Fixing WordPress
In reply to: Footer sub menu not displayingHi @ingukjd,
Good Day.
Since your website is not live yet, I think it would be great if you could share a screenshot of your website so that we could better look at the issue.Thanks
Forum: Fixing WordPress
In reply to: How to remove Nav Bar background?Hi @mikehende,
To remove the gray background color around the Nav Bar menu, just copy the CSS code below and paste it into your WordPress theme customizer.
CSS Code:
#site-navigation { background: transparent !important; }
- Next, navigate to your WordPress dashboard.
- Go to Appearance > Customize.
- On the customizer, look for the Additional CSS option.
- Paste the CSS code in the Additional CSS field and click Publish.
- Now refresh your website, and you should see the changes on your header menu.
Try the recommended suggestion and let me know how it goes.
Best regards,
Jerry
- This reply was modified 11 months ago by Alor Web.
Forum: Fixing WordPress
In reply to: Cursor Jumps to end of page when editingHi @mike2150,
I understand the frustration you must be feeling dealing with these unexpected issues while editing your pages.
Try to enable the distraction-free option on the page that you are editing.
To enable the distraction-free, just follow these steps:
- On the page that you are editing, navigate to the three dots on the right menu of the page and click on that. See image: https://share.zight.com/YEuJNxN9.
- It will show some additional options for your page editing view. Select the Distraction free option. See image: https://share.zight.com/qGuBA21w.
- You may be now able to update the content of your page without the cursor jumping to the bottom of the page again.
- To save or update your page, just mouse hover on the top of your page and the toolbar will just show up, and you can now click on the Update button. See video: https://share.zight.com/4guWAoDy.
You can also read this article for more information: https://www.ads-software.com/documentation/article/distraction-free-mode/.
Try the following recommendations, and please let me know how it goes.
Warm regards,
Jerry
Forum: Fixing WordPress
In reply to: Multiple hreflang tags in header code