Wordpress Change Front page displays settings conditionally when user is online - wordpress

Created two pages -> Feeds and Blog
If the user is online then
Front Page displays settings should point to A static page where Front page should be "Feeds" and Posts page should be "Blog".
When the user is offline then
Front page displays settings should point to Your latest posts, default.
For that particular users only.

You can use this function to check if user is logged in:
https://developer.wordpress.org/reference/functions/is_user_logged_in/
And this function to redirect to specific page for each user
https://developer.wordpress.org/reference/functions/wp_redirect/

Related

Is there a plugin that requires login to view Frontend WordPress site?

We are creating a multi-vendor marketplace, we need our first vendors only to view the site and upload products to it before we launch it for the public to view. The thing is most plugins like Force Login, takes them to the WP-Admin. We don't want them to see the admin page, just only see the site as a front-end user with no access to see the backend.
Simply > Type Url > Get to a login page Landing Page (like how when you log into FB web there's a login page with info about FB) > Vendors Only can Log in a view the FRONT END only site > When time to launch, login in page comes down and visitors all can view it.
Its default feature of wordpress. do hire some developer if you are not aware of base functionalities.

Stop WordPress from creating unneeded pages

I'm creating a landing page in WordPress and I've got an issue.
I've got a custom post type (that's an image), that is displayed via carousel and when clicked opens another web-site in a new tab. Problem is that WordPress generates page for every new page, should it be custom post type page or just basic post page.
I'm using only my main page on web-site so I don't want user to somehow access those pages, cause they basically display nothing.
How can I disable this feature and make WordPress redirect user to main page, if he is somehow trying to access this post pages?
If you are using only main page and your post pages show nothing (I mean they generate 404 error) you can redirect visitors to home page. In this purpose you can use plugin like this one: All 404 Redirect to Homepage

wordpress - allow user to edit admin created page only

I'm looking for some advice on setting up wordpress to allow the following:
admin creates 1->N pages, one for each user.
a user is able to update their page only
a user can log in to update their own profile only
a user can not make any other changes
the whole site (and all users pages) are viewable by anyone
I'm not sure if the above is possible out of the box, or with some plugins, but any pointers would be appreciated.
You could use the user description for the editable content and then the user pages would be their public profiles, e.g. http://example.com/?author=123
You could use the author.php file to modify the appearance of that page. you can also set permalinks to true to make the links nice.

Make login form in wordpress

I did a login form with this link http://wplift.com/how-to-create-a-custom-login-page-for-your-wordpress-theme
When I login it redirects to the page of the profile, but I wanted to stay on the same page with a user's session! Is it possible?
I have knowledge in PHP, but it is the first time I am using wordpress and I'm not used to.
There are a couple of good login redirect plugins that can be set to return users (based on role, for example) back to the referral page, or to a predetermined page, instead of to the dashboard.
Here's one I've used a few times, it's got some great options
http://wordpress.org/extend/plugins/peters-login-redirect/

Google Analytics + Wordpress /dir/ and /dir/index.php appearing as separate items

The Google Analytics information for one of my Wordpress sites is showing /dir/ and /dir/index.php as separate items - is there a way to prevent this from happening?
Yes, in the profile settings set the default page to index.php. Google Analytics Index Page Tracked Separately
Even though www.example.com/ may be the same page as www.example.com/index.html, they show up as two separate entries in your reports. You can configure Google Analytics to treat them as the same page by defining the Default page for your profile:
Click the Analytics Settings link.
In the Website Profiles list, find the profile to modify and click Edit.
Click Edit next to Main Website Profile Information.
In the Default page text box, enter the default (or index) page for this domain. This is the page that loads when a visitor enters only the domain of your site into their address bar. For example, if www.example.com loads your index.html web page, enter index.html in this text box.
Click Save Changes to update your default page, or Cancel to exit without saving.

Resources