skip to Main Content

how to add custom url rewrite ie from query string url to pretty url in wordpress using add_rewrite_rule

I just need to redirect test.com/buying/properties-for-sale/?property=-north-gorley-11409 to test.com/buying/properties-for-sale/-north-gorley-11409 in wordpress I have tried the below rewrite but result in 404 page add_rewrite_rule('/buying/properties-for-sale-salisbury-2/?([^/]*)', 'index.php?pagename=properties-for-sale-salisbury-2&property=$matches[1]', 'top');

VIEW QUESTION

How to get an image metadata such as alt text, caption and description from media library in wordpress – SEO

I am trying to get metadata associated with the featured image but get_post_meta keeps returning empty. $image_alt_text = get_post_meta($image_id, '_wp_attachment_image_alt', true); This works and returns the data, but the code below does not work: $image_description = get_post_meta($image_id, '_wp_attachment_description', true); $image_caption…

VIEW QUESTION
Back To Top
Search