create page for custom URL in wordpress - php

I went through similar questions on SO but didn't get my answer. So I thought to put this together in a more simpler way here.
I have a website with url like :
http://domain.com/user/user-name [ here user-name is dynamic and changes for every user, pretty obvious. ] - This right now works perfectly fine.
Next :
I need to show pages as below for users in a url like :
http://domain.com/user/user-name/about
http://domain.com/user/user-name/contact
http://domain.com/user/user-name/posts
etc
FYI : I'm using ultimate member plugin to manage user profiles.
So I need to know how can I crate separate page for each of the above mentioned URL's custom to each of the section like about / contact / posts.
though I'm working with wordpress since quiet a time now but this problem makes me feel newbie to it. Please tell me step wise on how can I achieve this.
I've spent 2 days already working out various things.
Thanks.

Take a look at the plugin called "Pods". It implemented the "URL Regex" as you required.
https://wordpress.org/plugins/pods/

Related

How to customise a wordpress search result?

My friend started a blogging website using wordpress for students to write on topics like world affairs, british politics etc. He is a philosophy student so himself doesn't any coding or web development and hence asked me since I'm doing a computer science degree to help him modify the search on his website. Basically the issue is that the search works normally except when you want to use it to search by articles written by a specific author. For example if you write the name of a person, all the articles written by him/her should be displayed. I have no experience in web development but watched loads of videos on youtube on how to customise the search but most of them just show to change its position on the page or just how it looks and none the way I want to specifically customise it. Are there links to any videos on youtube or articles that explain how to do it or what should I do to customise the search in this way?
I have been telling him for the past week that I will help in because I was confident I would have solved the problem but since I actually started trying the past couple days, I've seen so many ways it could go wrong from ftp to messing up the whole website. I'm sure if it's not clear enough or my question is stupid, I thought for a while before posting this on stack overflow.
MODIFY YOUR THEME’S SEARCH.PHP FILE
What we want to do is first take a look at the current search results page. If your theme is not presenting a search bar to make an actual search query, then you can simply append the following to your site’s URL : yoursite.com/?s=your+search+string.
Passing this query will send you to the search results page. Ideally your query should actually produce results so you could try to use a general search phrase that you know will produce multiple results.
Once you have a good idea as to how the results looks now, you can visualize a clear direction as far as how you want it to look. The search.php file usually starts with the following link :
this link

WP site generating weird session id next to page url

Few pages of my WordPress site generating weird session id next to page url for example http://www.example.com/?wvsessionid=wvac7224adb9a344b4b05354762584a621 . I don’t know where this coming from. bad thing is google indexing them & it creating duplicate content issue. where should i look for this issue & any idea , how I can solve it?
This could be one of two things:
some plugin is generating this, in that case search in plugins code to look for wvsessionid phrase which will tell you which plugin is generating this and why.
another option is some injected code due to hacking but that less likely as this parameter wouldn't be of much help.

Is it possible to make referrals like example.com/username on WordPress?

We want to have as much simple as possible referral links to our site for users. The best to have something like: example.com/username
But in this case we need to invent some way to make all other links working in WordPress. The idea how to implement it using mod_rewrite should look like:
If no any parameters provided - rewrite to / and process index.php
If parameter provided represented in site structure with file or directory - rewrite to example.com/parameter and show the content from site.
If link contain /s/ (example.com/s/something) then it's our post, which we should translate to something which allow us to see a post.
If one parameter provided - rewrite to example.com/parameter and process example.com/index.php?ref=parameter
Question is: Will it work for all plugins (at least woocommerce and some other) or is it possible to implement at all ? I really don't know how permalink and other wordpress part is working.
Thank you for your ideas.

Page forwarding with transfer of parameters called in URLs from one folder to another

In my wordpress page, links are addressed in the way:
www.mywebsite.com/blog/?page_id=1234
And each number gives a different page. I would like to have a forwarding mechanism that would forward a page in the form
www.mywebsite.com/mypage/?page_id=1234
when done in the folder "mypage", to the other folder "blog" as:
www.mywebsite.com/blog/?page_id=1234
with transferring each variable I have on the URL (in this case the only variable is page_id, and I would like to have all the variables forwarded to another page).
I'm pretty experienced in HTML and C/C++, but a beginner in PHP (though I've noticed that PHP is very similar to c in its logic, and I've done many changes in my Wordpress page based on my knowledge in C).
How can I do such a forwarding of code? Is it possible?
If there's any information missing, please let me know.
Thank you for any efforts.
This website gave a good tutorial on this. It took me 15 minutes to implement the solution.
http://html.net/tutorials/php/lesson10.php
SESSION if you want it to be specific for every user, POST if you dont want to change the url and the same for every user.
Im not really sure I understood your question.

Simple advertise block drupal

I'm looking for a simple module/code that allow me to manage advertisement.
I've tried many modules but I found just complex stuff and with non logical structure, I've also tried to edit some modules but the are too much work to do.
I'd like just to create custom block with an image field and a tracking system (impressions, click etc).
So the ad manager can just go to the page, click on the context link, see the impressions/click and he can upload new pic for the ad.
I mean something really easy and intuitive, I place the blocks around the site, the ad manager (website admin) upload manage blocks.
I cant find anything that works in this simple way, and I cant figure out how to write down some code for get this easy system work.
Any help?
I would suggest the module Simpleads. I'm using it on a site right for doing simple ad tracking like you described.
Here is a link to the module. http://drupal.org/project/simpleads
have you tried using this module http://drupal.org/project/ad , i guess this will help you

Categories