Saturday, May 4, 2019

Updating Book: How to make money from c2 games - ver2

Rewrote chapter 11 to remove references to construct 3 and why I don't use c3 and republished to kindle at:

11.30 am May 5, 2019


At 2.40 pm the status has changed to LIVE UPDATES PUBLISHING
At 3.55 pm I received email informing me the book is available. Upon checking it says LIVE.

Wednesday, May 1, 2019

Wordpress grid card style

How to customize wordpress to show posts as grid card style like this:


Note that I am using the theme called VW Mobile App
Install the plugin called The Post Grid by Radius Theme.

Then customize the background color of the button to blue and the button text color to white.
Then customize the css for h1 tag for the VW Mobile App:

h1 { 
  display: block;
  font-size: 2em !important; 
  margin-top: 0.67em;
  margin-bottom: 0.67em;
  margin-left: 0;
  margin-right: 0;
  font-weight: normal !important;
}

h2 {
  display: block;
  font-size: 1.5em !important;
  margin-top: 0.83em;
  margin-bottom: 0.83em;
  margin-left: 0;
  margin-right: 0;
  font-weight: normal !important;
}



Submitted new book Make money with Construct 2 Games to Amazon Kindle

Submitted at 4 pm on May 1, 2019 (Wed). Status: IN REVIEW
By 6 pm status changed to: PUBLISHING
By 9: 20 pm status changed to: LIVE

Sunday, April 28, 2019

How to make twenty seventeen menu icon and text black color when layout is resized

By default, when you resize the screen using chrome responsive emulator, the menu bar cannot be seen because it is white, and the background is also white.

Solution is to change it to black by pasting this css code into the Additional CSS section of customization for twenty seventeen:

.menu-toggle {
    color: #000;
}

@media screen and (max-width: 768px) {
    .navigation-top .menu > .menu-item > a {
        color: #000;
    }
}


How to remove Powered by wordpress and insert your own Copyright message

Go to namecheap and goto cpanel. Open file manager and goto:

androidresearch.net/wp-content/themes/twentyseventeen

In there, edit footer.php as follows:



Step 1:  Comment out the php line in line 42
Step 2: Insert your copyright notice in line 44.

For crackinglessons.com did this:


How to make posts full width in wordpress twenty seventeen

Paste this css in the customized css section of twenty seventeen:

.single-post:not(.has-sidebar) #primary, .page.page-one-column:not(.twentyseventeen-front-page) #primary, .archive.page-one-column:not(.has-sidebar) .page-header, .archive.page-one-column:not(.has-sidebar) #primary {
   max-width: 1000px;
}

.page-one-column .panel-content .wrap {
   max-width: 1000px;
}

@media screen and (min-width: 48em) {
    .blog:not(.has-sidebar) #primary article,
    .archive:not(.page-one-column):not(.has-sidebar) #primary article,
    .search:not(.has-sidebar) #primary article,
    .navigation.pagination,
    body.blog .site-content .page-header,
    body.archive .site-content .page-header,
    body.search .site-content .page-header {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 1000px;
        width: auto;
    }
}


References:

[ Sheriziya's solution works: ]


Saturday, April 27, 2019

Add new post in PhoneGap Build Forum

Added new post in PhoneGap Build forum promoting my new book:

How to Admob your PhoneGap Apps

and my app:

PhoneGap AdMob Guide

https://forums.adobe.com/ideas/11110


How to make navigation bar sticky i.e. fixed to the top when you scroll

[ Not working when logout of admin ]

Install this plugin:

Sticky Menu (or Anything!) on Scroll
By Mark Senff

Then, follow his instructions here:



Below, I describe what I did.

Open your page and inspect source. Look the the div of the navigation bar.
In my case it is as shown below:





Copy the class and paste it in the settings for the plugin:


Since it is a class, you need to put a .  in front.  If it is an id, put a # prefix.



Test

How to disable wordpress comments

I used the discussion settings on each post.



Reference:

https://kinsta.com/knowledgebase/wordpress-disable-comments/

How to add contact form to wordpress

Install the plugin Contact form 7.
Then install the plugin




Then goto https://www.google.com/recaptcha  to generate a pair of keys.



Copy and paste those keys into the plugin for form 7 captcha.





Copy and paste the form 7 captcha plugin short-code into form 7 plugin:



Paste contact form 7 into your contact page:




Test

How to insert short codes into a page


If you’re using the Gutenberg editor, then click on the + sign, search for “shortcode”, then add the Shortcode block.

Reference:

https://themeskills.com/how-to-add-shortcodes-wordpress-post-page/

Thursday, March 14, 2019

How to add google analytics to blogger

Read this:

https://www.betterhostreview.com/add-google-analytics-blogger.html

Since both the blogging and analytics services are powered by Google, Blogger offers very good support to the Analytics. To add Google Analytics to Blogger, you can simply input your Google Analytics tracking ID to your Blogger account. Log on your Blogger account, go to Settings, then Other, at the very bottom of this page, you will find a Google Analytics section with a Analytics Web Property ID box.


Useful software and services

For online business, these are some useful software/services:

1. http://screencast-o-matic.com

2. http://getresponse.com

3. http://ecwid.com

4. https://www.codester.com/

5. https://payhip.com/

6. https://www.meetup.com/

7. https://www.createspace.com/



Wednesday, March 13, 2019

Submitting your site to Bing

Read this:

https://blogs.bing.com/webmaster/september-2018/Anonymous-URL-Submission-Tool-Being-Retired

You can sign up for Bing Webmaster tools here:

https://www.bing.com/toolbox/webmaster/

Here's a successful submission:


Where is the xml sitemap for your Wordpress site?

Go to Yoast's SEO plugin and click on the ? beside the Sitemap feature:


You can read more about it here:


How to claim ownership of your website via google webmaster tools

You can easily claim ownership of your website by going here:

https://www.google.com/webmasters

Choose URL prefix:


Then verify via google analytics, and by uploading a page that google gives you. You can check settings to see your verification status:






How enable adsense in wordpress

Adsense requires you to add your new website to their list:



To enable adsense in your wordpress website, you need to paste this code between the head tags:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "ca-pub-6220266062998622",
          enable_page_level_ads: true
     });
</script>

You should also read this:

How to insert ad code in your WordPress site

Use this plugin:

Insert Headers and Footers


Tuesday, March 12, 2019

How to find multiple analytics code on WordPress site

Read this article:

https://www.monsterinsights.com/docs/how-to-find-duplicate-google-analytics-tracking-codes-in-wordpress/

Testing your Wordpress Adsense ad

To test whether an ad will be visible if available, post this into the respective wp-insert or any ad plugin:

<img src="https://via.placeholder.com/468x60/0000ff/ffffff.png?text=TEST">

It should show a blue banner as below:


Monday, March 11, 2019

AdSense Rules

How many ads you can show on your website at any one time?

Answer:

3 Display Ads (eg Large Rectangles) + 3 Link Ads (eg Horizontal Large Links)

Remove read more links in blogs

If using GeneratePress theme:

Step 1


Step 2:



Step 3:





Some wordpress and adsense ideas




This one is ver successful and still active:



How to clear WordPress cache

If your browser appears not to implement any changes you make to your WordPress changes, eg, Cookie Law Settings, then the culprit could be W3 Total Cache plugin. You need to empty its cache:


Friday, March 8, 2019

2 Ways of accessing Word Press Posts

First way is using ajax:

//--- Hanchiang News (Ajax) ---
function getAjaxNews() {
var newsContent = '';

const apiRoot = 'http://www.hanchiangnews.com/en/wp-json';

$$.ajax({
url: apiRoot + '/wp/v2/posts/?per_page=5',
success: function(posts) {
//console.log(posts);
const objs = JSON.parse(posts);
for (let post of objs) {
newsContent += post.content.rendered;
}
$$('#id-news-content').html(newsContent);
},
error: function(err) {
console.log('Error: ', err);
}
});
}


Second way is using wp-api (WordPress REST API client):

//--- Hanchiang News (wp-api)---
function getNews() {
var newsContent = '';
//const apiRoot = 'https://hjuapp.site/wp-json';
const apiRoot = 'http://www.hanchiangnews.com/en/wp-json';
var wp = new WPAPI({ endpoint: apiRoot });
wp.posts()
.perPage(3)
.then(function(posts) {
posts.forEach(function(post) {
console.log(post.content.rendered);
newsContent += post.content.rendered;
});
$$('#id-news-content').html(newsContent);
});
}

Thursday, March 7, 2019

Getting wordpress posts using REST API

Below is a function to get the posts from a WordPress website:

function getNews() {
  const apiRoot = "https://test.site/wp-json";
  var wp = new WPAPI({ endpoint: apiRoot });
  wp.posts()
    .perPage(3)
    .then(posts => {
      posts.forEach(function(post) {
        console.log(post.content.rendered);
      });
    })
    .catch(err => {
      console.log("Error: " + err);
    });
}


You need to reference the wp api library in order to work:

<script src="wpapi/wpapi.min.js"></script>

The wpapi can be downloaded from:

http://wp-api.org/node-wpapi/


Wednesday, March 6, 2019

How to embed pdf inside Wordpress

Use Gimp to open the pdf and export as jpg.

Then insert the jpg into a new Wordpress post.

How to create multi blog wordpress

Just follow the instructions here:

https://wpblogdesigner.net/create-multiple-blog-pages-in-wordpress/

In summary:

1.  Create categories news and calendars
2.  Assign your posts to either of these categories
3. Under Appearance/Menus, assign these categories to the Categories section:


How to remove multiple background images on home page

In the default theme installation for Wordpress 2017 theme, therea are multiple background images on the home page when you scroll down. To remove them, just go to each individual page and remove the Featured Image:


How to remove multiple pages in home page

If you find multiple pages being shown on home pages, just remove it like below: