Random Post Widget
-
When I use the text-code for random post widget i.e. http://www.myurl.wordpress.com/?random as given on https://en.forums.wordpress.com/topic/random-post-widget-1?replies=4, it only leads to my about page. Not the random posts.
Is it due to the theme I am using? I am using Misty Lake theme.
The blog I need help with is: (visible only to logged in users)
-
Are you currently testing themes? Between refreshes I’m seeing 2 themes in use on aregularindiangirl.wordpress.com
On my first visit, your site was using Misty Lake, then I refreshed the page and now it’s using Twenty Fourteen.
Even the site visit counters are significantly different. ML has 3,294 visits, 2014 has 3,322 visits.
You may have signed up when there was a glitch that was creating 2 parallel sites. Don’t delete anything and I’ll tag this for staff to look at.
-
Hi there,
When your site is set to have a static page as the front page, that random URL will give you a random page on your site. If you’d like it to show a random post, you’ll need to put ?random at the end of the link to your blog page.
However, I checked your site’s Reading Settings and noticed that your front page and posts page are set to the same page. That can cause problems on your site. To fix it, please create a second page to use as your blog page and select that as the posts page under Settings > Reading in your site’s dashboard.
Then, you can use the link to that blog page and add ?random at the end to get a random post.
-
-
@justjennifer – The theme was changed on the site while you were looking at it, which explains that change, and it’s possible you happened to catch the stats counter as it updated with the new count. I checked for the parallel sites glitch and it wasn’t an issue on this site. (Thanks for thinking of that, though!)
-
Thanks a lot Jennifer.. After I posted up, I read somewhere that certain themes do not support random post code. So I switched to twenty fourteen. I am sorry for the confusion. And thanks a lot for your help!
Rachel, I’ll do as you suggested and check if the issue still persists. thanks a lot!
-
@aregularindiangirl – No worries or apologies needed.
@rachelmcr-
When your site is set to have a static page as the front page, that random URL will give you a random page on your site. If you’d like it to show a random post, you’ll need to put ?random at the end of the link to your blog page.
Learn something new every day. :)
So if I understand correctly, once the new Post/Blog page is created (in my example “posts”), and that page set as the “Posts” page in the site’s Reading Settings, then all one needs to do to generate a random post in a text or image widget is to use the link myusername.wordpress.com/posts/?random. Correct?
-
And just to clarify, I also understand that this won’t do a thing in terms of changing the Random Post link found in the Admin bar when visiting a site. That will continue to point to Pages if the site has a static front page.
-
So if I understand correctly, once the new Post/Blog page is created (in my example “posts”), and that page set as the “Posts” page in the site’s Reading Settings, then all one needs to do to generate a random post in a text or image widget is to use the link myusername.wordpress.com/posts/?random. Correct?
That’s right. However, I was checking on this (and the issue with the random post link in the admin bar) and discovered that this might not be intentional. I’m checking with our developers now to see if this is actually just a bug and it should work the other way instead.
Sorry for the confusion! I’ll let you know what I find out from them.
-
-
Nope, I did try correcting that but it doesn’t work like that. My site is made on posts and I have only one page, the about page, that is the one that is static.
But even on changing that, the random post code doesn’t work.I changed the page again because I am still trying to figure out what I want on my home page.
Shall wait for your reply. Thanks!
-
If you want people to access random posts via your text widget link, you do have to set up a Posts page (which is just a blank page, but published), like my example above and set it in Reading settings as the Posts page. Then in your text widget, the link to get a random post becomes aregularindiangirl.wordpress.com/posts/?random (with the http:// part, of course).
Users can’t control the Random Post link in the Admin bar. That is what WPcom has to take care of for sites that have a static front page.
-
Hey Jennifer. Thanks.
I did what you asked me to.
1. I created a blank page and made it my posts page in reading settings.
2. I have put links on my blog (content bar, at the end).One is with this code: Click here for random post
And the second is with this code: Click here for random post
And none of them works :(
-
Oops.. the codes are converted to links in the above reply.
1.<a href="http://aregularindiangirl.wordpress.com/?random" title="Click here for random post">Click here for random post</a>
2.<a href="http://aregularindiangirl.wordpress.com/posts/?random" title="Click here for random post">Click here for random post</a> -
Two thoughts:
The first one is the link you tried previously and will only bring visitors to other Pages on your site, as @rachelmcr said.
The second one should work, IF you have published your Posts page. Since I’m getting a Page Not Found error when I visit that Page directly, I suspect that you may have created the page and set it as the Posts page in your Reading Settings, but you may have overlooked publishing the page (even though it is blank).
-
Hey, sorry for the late reply. But no, the page is definitely published. It says published on: Oct 20, 2014 @ 14:28
-
Hi there,
The page you published is at this link: http://aregularindiangirl.wordpress.com/337-2/
To see a random post, you can use this link: http://aregularindiangirl.wordpress.com/337-2/?random
-
- The topic ‘Random Post Widget’ is closed to new replies.