Show different home page based on user role in WordPress [closed] - wordpress

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I've got three home pages:
1. home
2. home-student
3. home-teacher
Based on their custom user role (student, teacher or not logged in) I would like to show a different homepage. My knowledge of PHP is pretty basic, so I'm hoping for an easy answer (or line of code I could paste in my child theme). Many thanks!

Since you do not have a lot of php experience, you may want to use a plugin like this one
https://wordpress.org/plugins/user-specific-content/
You can then use shortcodes in your homepage content to designate who see what. Like...
[O_U user_id="1"]Content goes here[/O_U]
There are other methods, but they would require hacking the page.php template. As long as you're not trying to have the header and footer look different, the plugin should late you have different page content for different roles.

Related

All posts and pages without template redirect to index [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have to do some work on older version wp site (4.3) whenever I create a new page and try to access it always give me front page. Other old pages are using templates and they are displayed fine but I need to have a page without a template. What should I look at to find the problem in order to be able to create a new page?
This is the mechanish fallback of wordpress. In order to have a theme you just need two files index.php and style.csc. see about template hierachy.
If you need a new page you must:
1) create a file page-.php in the folder of using theme
2) from the Gui of wordpress create new page with title
then if you write the proper html/css you are going to see the template that you have created

modifying url to display more results per page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How would one find out if it's even possible on specific site?
For example https://forums.eveonline.com/default.aspx?g=topics&f=257
There are many more sites where I wanted to display more results per page but option is not available.
Without knowledge of the code base, there is no way to know whether you can change the page behavior via a URL parameter, other than trial and error.
If the site is well designed, all URL parameters ought to be validated against a white list, so it should not be possible to hack the URL. So you should not rely on this.
I know that this is not answering the real question and i know that John Wu is right: You can't obtain this via querystring if you don't know if this is coded server side. What i think is that there is always a way:
For example, in this case you can use rss feed (the button placed at the bottom of the page):
https://forums.eveonline.com/default.aspx?g=rsstopic&pg=Topics&f=257

Wordpress editor / subscriber role [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
On one of my websites, the editor and subscriber have access to Dashboard, Profile and Plugins. This is really strange. There is no access to anything else - pages, posts etc.
Have tried re-installing wordpress and makes no difference.
Not using any user access plugins
Any help would be greatly appreciated!
Chris
You should test the capabilities of your users and re structure them accordingly. Have a look at The Codex to get a list of capabilities for editors and subscribers.
If you want to use plugins, you can find some that will allow you to edit the capabilities.
else you can then use get_role(), add_cap() and remove_cap() to correct their capabilities.
You should switch to a standard theme such as twenty twelve and see if it woks properly, of it does the problem is your theme and you should contact the theme author.

Wordpress - Custom "plugin" that displays on a Page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 months ago.
Improve this question
I have to build a custom plugin for a client who is using wordpress. I am dont use wordpress so I dont know how it works. I just want to understand how this will work..
I have to build them a search plugin that will be display inside a page. It will get data from an excel spreadsheet that lives on the server, so they can edit that content and it will pull all that data into the page. Is this a plugin? where do I start?
I will also need to use jQuery to do some more to the data once on the page.
Wordpress plugin develop does take some work, but it is extremely well documented. I would go to the following pages in the order that they are listed:
http://codex.wordpress.org/Writing_a_Plugin
http://codex.wordpress.org/Plugin_API
http://codex.wordpress.org/Plugin_Resources
Once you've gone through those pages, you should have a lot more information on plugin development and how you might do what you are after.
I had the same question. Looking at some plugins, it seems they are using short codes to place plugins in specific pages. Here's the link in wordpress:
http://codex.wordpress.org/Shortcode_API
For WordPress 6.0 please check this page:
Plugin developer handbook

Wordpress: Create a customized role / user [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I’m farely new to Wordpress but are working on putting a page together which has a very simple purpose. I’m creating it for a customer with little or none IT experience so I want to create a user he can use to login and edit his pages – and nothing more. No settings, no comments, no posts, no links, no nothing, just create, delete and edit pages and maybe edit his own profile or at least his E-mail and password.
I can see that wordpress has some predefined roles for users but none of them completely does what I want and they either has to little or to many rights. I’ve been looking at the wordpress page http://codex.wordpress.org/Roles_and_Capabilities but can’t seem to get a clear answer.
Is it in any way possible for me to create my own user role (e.g. customer) where I can set the rights I want for him?
Thanks
Sincerely
Mestika
Install the Role Manager plugin. It does exactly what you want.
You can simply hide all unnecessary options from the admin panel. Use Adminimize plugin.

Resources