Mediawiki - How do I change which page is the main page? - mediawiki

I have setup my own Madiawiki for a project. I would like to change the main page but the only thing the Mediawiki FAQ say is:
“By default, MediaWiki looks for a page with the title Main Page and serves this as the default page. This can be changed by altering the contents of MediaWiki:Mainpage to point to a different title. If this does not change the 'Main Page' link included on the sidebar at install time, edit MediaWiki:Sidebar.”
The problem is I do not know where to edit this “MediaWiki:Mainpage”. Where do I find this line to edit it? Also if I make a page with the name “x”, and I want it to be the main page do I then change “MediaWiki:Mainpage” to “MediaWiki:x”?

In the search bar, type MediaWiki:Mainpage. Then edit it so its content is the name of the page you want to be the main page. MediaWiki:Mainpage should always contain the title, because it is a system message that is reserved for the title of the main page, so don't change it to MediaWiki:x.
See also: https://www.mediawiki.org/wiki/Manual:Main_Page for changing the main page and https://www.mediawiki.org/wiki/Help:Namespaces#MediaWiki for the MediaWiki namespace and system messages.

Related

In Wordpress I am trying to place a search bar in the middle of the front page. Not sure how

Okay so I am pretty sure me attempting to place a search bar in the middle of my home page on my website does not depend on the theme itself. However, I have already tried to place a search bar there with the current theme and all it allows me to do it place one in the footer or header of certain pages.
Thank you for taking the time to help.
You would need to remove <?php get_search_form(); ?> from your theme's sidebar template and place it in another template file (e.g. page.php) or in a custom page template.
If you put it in page.php be warned that it will show up in every page. You can make a custom template to avoid this and keep it on which ever page you designate.

How to edit WordPress page's html code

I can't get editable html code behind the page. I want to make some changes to the page. Web site is hosted in the remote server. Someone assigned this task. There is empty editor when open edit page as below image.
Also I added plugin and actived it but can't get the result.
The picture you posted is of the WYSIWYG editor, which is only for adding content to the page.
If you want to edit the layout of the page itself you have 2 options -
Minor page edits to appear across all pages on the site - Go to Appearance -> editor -> page.php and then edit the code to suite your needs.
Large page edits to appear on one or two pages -
Get access to the files
Duplicate page.php with a different name
Edit code
When you go to add a new page you should have an option to pick a page template. Choose the page template you just created.
If you know exactly what you are doing, you can use Chrome "Inspect" feature, and change the HTML of the content inside the WordPress WYSIWYG Editor. After injecting your HTML, click Preview or Publish and your changes will be saved correctly.
In WordPress 5.5.3, you should be able to click the three dots on the top right, then select Code editor. Alternatively, press Ctrl+Shift+Alt+M.

Main page change through Mediawiki:Mainpage url doesn't work on Mediawiki 1.22

I've installed mediawiki 1.22.5 and I've tried to change the main page through the Mediawiki:Mainpage url to another page but It doesn't seem to work!
What I do is edit the http://www.mysite.com/en/index.php?title=MediaWiki:MainPage and write in the text window the name of the page I want as the main page (I've even copied/pasted it to make sure it is written correctly!). However when I click on the logo it takes me to the default main page, not the one I wrote in Mediawiki:Mainpage.
I can change the main page link in the side-bar but the problem with the logo remains.
And I don't want to create just a redirect as it is not elegant on the main page.
Any help is appreciated!
MediaWiki:MainPage should change also the target of the logo link. If it doesn't, my first guess would be extensive caching.
Is your wiki public? Can you provide us with an url?

Making a section of a page readonly in MediaWiki?

I would like to make a section of a page read only while other sections can be editable. Is this possible in mediawiki? I know I can add the NOEDITSECTION tag, and it removes the edit links in the section, but I still can edit it in the main edit page.
Not explicitly, no. But here's what you could do instead:
Put your read only section on a new page and protect it. Transclude the contents of that protected page onto the primary page. A user would still have the opportunity edit the primary page and entirely remove the section, but they cannot edit the contents of that section.
If your protected page is named MyProtectedPage, then you'd put {{:MyProtectedPage}} on the primary page to transclude it.
There is a mediawiki extension called ProtectSection which was designed to do exactly what you're requesting. However, it has not been maintained for years. I've been unable to get it working on the latest version of MediaWiki, but if you're running an older version, perhaps it will work for you.
https://www.mediawiki.org/wiki/Extension:ProtectSection

how can i make my custom html webpage the index page of my wordpress site

I have created a custom html webpage that i wish to use as the homepage or index of my site. However my site is a Word press site. How can i make my custom webpage the index of my Word press site?
It will need to be a php page within your theme folder. You will then need to declare it as a template file by doing the following:
<?php
//Template Name: Homepage Template
get_header() ;
?>
Create a new page and assign the Hompeage Template.
It your wordpress reading settings you will to set Your latest posts to a static page and select the page you just created.
You create a template and put it in the theme you are using. An example name would be page-home.php.
At the top of the page you put this...like shown here http://codex.wordpress.org/Page_Templates
<?php
/*
Template Name: My Custom Page
*/
Then you save it and go into the Wordpress console and find the page that you want to change the template and under page attributes on the right hand site you will see Template. You select "My Custom Page" from the list and save it.
If you don't see page attributes pull down the screen options in the right upper corner and make sure Page Attributes is checked.