Wordpress Plug-ins How-to add custom SEO friendly URL Handles

0 votes

I was wondering if its possible to use the permalink settings in plugins instead of them using default non permalink urls.

For example i'm using the plugin flickr photostream which is downloadable from here http://wordpress.org/extend/plugins/flickr-photostream, its written by someone else, but I would like to know for my own plugins and to patch this one to create nicer permalinks instead of http://www.domain.co.uk/?flickrps=2 to go forward and back between pages.

Someone has suggested this url to me, and I have tried to attempt to patch this into the above plugin, but not having any luck to achieve what I am after.

Wordpress Plug-ins: How-to add custom URL Handles

I managed to find this via google, and seemed fairly easy to do, but am not getting the results I was expecting. http://gabrielharper.com/blog/2012/09/wordpress-custom-urls-for-plugins/

Instead of http://www.domain.co.uk/?flickrps=2 I would like the urls to be something similar to http://www.domain.co.uk/page/2.

The links above that I would like to use sadly don't work and give error 404 on them, the links with the question marks in them however do work, but I would prefer not to use these.

I understand this is taken by WordPress but just after something like this, maybe photo would be better perhaps.

add_action('parse_request', 'addFlickrPhotostreamURL');
function addFlickrPhotostreamURL() {
    global $flickrpsp;

    // Manually parse the URL request
    if (!empty($_SERVER['REQUEST_URI'])) {
        $urlvars = explode('/', $_SERVER['REQUEST_URI']);
    }

    // Check for querystring variables
    if ((!empty($urlvars[1])) && (!empty($urlvars[2]))) {
        $_REQUEST['page'] = $urlvars[1];
        $_REQUEST['flickrpsp'] = $urlvars[2];

        $flickrpsp = $urlvars[2];
    }

    // ... handle multiple types of URL by checking $urlvars[1] here
}
Mar 5, 2022 in Digital Marketing by Kichu
• 19,050 points
405 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
1 answer

How to get Stack Overflow SEO friendly URL structure in Nuxt.js?

The following worked for me : To get ...READ MORE

answered Mar 11, 2022 in Digital Marketing by narikkadan
• 63,420 points
1,412 views
0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,420 points
662 views
0 votes
0 answers

How to over-ride meta data in Wordpress, using Squirrly SEO

I currently have a Wordpress website using ...READ MORE

Mar 4, 2022 in Digital Marketing by Kichu
• 19,050 points
366 views
0 votes
0 answers

How to make website more SEO friendly when the content is coming from the database? [closed]

How can i make my database content ...READ MORE

Mar 5, 2022 in Digital Marketing by Kichu
• 19,050 points
200 views
0 votes
0 answers

nginx clean url with seo friendly file names

I wish to implement the following which ...READ MORE

Mar 2, 2022 in Digital Marketing by Kichu
• 19,050 points
519 views
0 votes
1 answer

How to remove home page title in Yoast SEO?

Here, you have two possibilities. You can ...READ MORE

answered Mar 4, 2022 in Digital Marketing by narikkadan
• 63,420 points
2,392 views
0 votes
1 answer
0 votes
1 answer

Does wordpress have a good uptime?

WordPress is just the software. Uptime of your ...READ MORE

answered Nov 16, 2019 in Others by Eric
528 views
0 votes
0 answers

How to Upload Aws lightsail increase upload size

Aws lightsail wordpress increase upload size limit ...READ MORE

Mar 16, 2020 in PHP by anonymous
• 120 points
1,251 views
0 votes
2 answers

Wix vs WordPress – How To Choose The Right One?

Hi, I know it's pretty late to ...READ MORE

answered Aug 14, 2020 in Web Development by markophillips
• 140 points

edited Aug 14, 2020 by markophillips 904 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP