Skip to content

The World of Engineers

Treasure of Concepts, Latest Jobs and Scholarships

Menu
  • Home
  • Blog
  • MCQs
  • Past Papers
  • Contractors
    • SSEM
    • Al Gihaz
    • substation contractors
    • OHTL Projects
    • SEC Projects
  • Design
    • 380kV Substation Design
    • Extra High Voltage EHV Substation Design
    • Transmission lines design
  • Jobs
    • Electrical Jobs
  • Privacy Policy
Menu
Add MCQs to Wordpress

Add MCQs in WordPress Posts or Pages

Posted on July 14, 2022July 26, 2022 by Engr. Hamid Ali

Hi everyone welcome to our first blog post on how to add MCQs in WordPress posts or pages. When I started my first MCQs based website I searched a lot on this topic. I watched a lot of videos on YouTube and searched topics like How can we post MCQs on WordPress, How to make MCQs website on WordPress and How to auto show and hide answers in MCQs but i couldn’t found the solution.

Finally I found an easy way to Post MCQs on WordPress site. If you want to make your own MCQs website using WordPress and auto show and hide answers of MCQs just follow these simple steps.

1. Select Header

The first step to add MCQs to your WordPress post is to select a header. When the Heading as shown in Fig. 1 is selected the Copy your MCQs question and Past in the heading. It will be better if you select H4 heading as shown in Fig. 2.

Fig. 1
Fig. 2

2. Copy your MCQs with Options

After you Past your MCQs question in heading area, press enter and past your MCQs options. Your Post will then look like as shown in Fig. 3.

Fig. 3

3. Choose block named Custom HTML

This is the important step to make your answer auto show and hide. Now select the block named custom html as shown in Fig.4 below.

Fig. 4

4. Copy below code to custom HTML file

After you select the custom html block the block will appear as shown in Figure 5.

Fig. 5

Next Copy the html code as shown below to the block custom html.

    <p style="display: none; margin: inherit;" id="B61">  Answer: Option b) two full converters connected back to back</p>
    <p style="display: none;" id="C61">Full converter is operated in two quadrants. 
        Hence in order to obtain four quadrants the drive requires another two quadrants,
         this will obtained by reversal of current. Reversal of current can be done by connecting two full converters in back to back
    </p>
<script type="text/javascript">
    function showans(Clickedid) {
        var x = Clickedid
        var y = x + '1';
        var Z = document.getElementById(y)
        if (Z.style.display == "none") {
            Z.style.display = "block";
            Z.style.border = "2px solid green ";
            Z.style.width = "fit-content"
            Z.style.padding = "4px"
        }           else {
            Z.style.display = "none" }
    }
</script>

5. Change the Button IDs

This is the important step change the button id and the id in the paragraph such that if the button id is B2 the paragraph id is B21, similary if the button id is B3 then the para id is B31 and so on as shown in below figures

Fig. 6
Fig. 7

6. Add answer and explanation in the custom HTML

Now Add answer and explanation in the custom HTML as shown in below figures

Fig. 8
Fig. 9
Congratulations you have made your first MCQs. Now repeat the process for each MCQs. For step by step procedure watch video. Your MCQs will look like as
Fig. 10

Our Top Posts

  • List of Contractors who Won Major BSP Projects in 2024 in KSA
  • Top Electrical Engineering Courses on Coursera
  • List of Top Substation contractors in KSA
  • Transmission Line Design Important Points
  • Panels required inside substations
  • Electrical MCQs with Explanation of Answers
  • Electrical Past papers
  • How to Add MCQs in wordpress posts
  • Transmission Lines design Basics
  • 380kV Substation Design (16)
  • Al BABTAIN (1)
  • Al Gihaz (3)
  • AL-OJAIMI (1)
  • Alsharif Group (1)
  • Basic Electrical (7)
  • Basic Electronics (5)
  • BSP Projects (16)
  • Communication System (1)
  • Control System (2)
  • Control System MCQs (3)
  • Courses (5)
  • electrical (8)
  • Electrical Courses (5)
  • Electrical Jobs (7)
  • Electrical MCQs (12)
  • Electronics MCQs (9)
  • Extra High Voltage EHV Substation Design (16)
  • Fellowships (2)
  • Fellowships in Pakistan (1)
  • FPSC (1)
  • HVDC Projects (1)
  • Information for Engineers (36)
  • Interview Preparation (27)
  • Jobs (10)
  • Jobs in KSA (11)
  • MATLAB and Simulink (1)
  • MCQs (13)
  • Microsoft Excel (2)
  • Microwaves MCQs (1)
  • NTS Past Papers (4)
  • OHTL Projects (7)
  • Past Papers (10)
  • Research Work (4)
  • Safety MCQs (2)
  • Saudi ARAMCO (3)
  • Scholarships (3)
  • Scholarships in Pakistan (1)
  • Scholarships in Pakistan (1)
  • SEC Projects (19)
  • SSEM (2)
  • Synchronous Condensers (2)
  • TDP (1)
  • Transmission lines design (7)
  • Uncategorized (23)
  • Web Development (1)

Latest Posts

  • Safety Assessment at Saudi Aramco Part 3
  • Classification of Lightning Protection Systems
  • Safety Assessment at Saudi Aramco Part 2
  • Safety Assessment at Saudi Aramco
  • Electrical Safety MCQs: Practice Quiz for Engineers

All Pages

  • Active Scholarships
  • C++ Data Structures
  • Electrical MCQs with explanation
  • Jobs
  • Privacy Policy
  • Technical Posts
  • The World of Engineers
  • Top Electrical MCQs with explanation

Follow Us on

  • Facebook
  • YouTube
  • LinkedIn

© 2025 The World of Engineers | Powered by Superbs Personal Blog theme