SEO Book PRO SEO Dashboard v0.0.16 Login Rich Snippets

What the_content and get_the_content are used for in WordPress?

Article Details and Information
badge This article was written by SEO Book Pro | Published on 8:42 pm, Tue, 16 March 21
SEO Book Pro Headline Feed rss_feed
Do you have content that you want on SEO Book Pro?
Here are a few ways to submit it to us.

SEO | Website Audit | WordPress SEO | SEO Audit Tools

↑ Grab this Headline Animator

Subscribe to Our Newsletter

Powered by FeedBurner

Enter your email address:

Delivered by FeedBurner

The WordPress functions the_content and get_the_content are used to pull the main text area from the page or post

The difference between them is in the way they are used. the_content() echoes WordPress editor’s content and it’s used inside the template files while get_the_content() is fetching it to be used in the PHP code as a variable.

Please note that there is also the_content filter which is used to apply styling and shortcodes by running a chain of filters like wp_autop which adds the tags. The full list of running filters trough the_content filter are wptexturize, convert_smilies, convert_chars, shortcode_unautop, and maybe one of the most used ones do_shortcode.

Now we can dig deeper into the functions

get_the_content pulls the copy directly from the database as a raw string containing the unwrapped shortcodes. In order to make that useful, you will need to pass the data through the_content filter which will give you an appropriate HTML output.

$content = apply_filters( ‘the_content’, get_the_content() );

And last but definitely not least is the_content. This function will echo the properly formatted content directly into your template. In its essence the_content calls get_the_content and applies the_content filter before echoing the result.

Learn More About WP Snipp Ninja – Daily Tricks Below

get_the_content() or the_content() in WordPress


16/03/2021 by SEO Book Pro

How to Enable the Default WordPress Lazy load for you Images and Iframes in 5 Steps ( No Plugin )

Article Details and Information
badge This article was written by SEO Book Pro | Published on 12:13 am, Fri, 12 March 21
SEO Book Pro Headline Feed rss_feed
Do you have content that you want on SEO Book Pro?
Here are a few ways to submit it to us.

SEO | Website Audit | WordPress SEO | SEO Audit Tools

↑ Grab this Headline Animator

Subscribe to Our Newsletter

Powered by FeedBurner

Enter your email address:

Delivered by FeedBurner

Learn How to add loading=”lazy” to your images and iframe codes in the pages of your website


Step One | Step Two | Step Tree | Step Four | Step Five


Step 1: Go Trough your Template Folder and find your active template folder

Step 2: Open the functions.php file with some code editor like Atom, Notepad, etc.

Step 3: At the top of the file right after the opening <?php tag add the snippet below to register and add template support for your custom WordPress Template with the default WordPress Lazy Load Function since WordPress 5.5 Version Announce

// Enable WordPress Default Lazy Load Functions for Images, Videos, Iframes
add_theme_support( ‘lazy-load’ );

Step 4: To get this work after adding this snippet above ^^ to your functions.php save the file to your server and viola your WordPress Template Support Lazy Loading Images and Lazy Loading I frames without adding Lazy Load Plugin or Other Additional Scripts to your WordPress Template files

Step 5: go Trough your Templates With Loops and <img src element and add before the closing img tag loading=”lazy” and your images from the loops or queried post or pages will load lazy


Example of image version with lazy load value-added below

<img src=”URL to your image” title=”The image title” alt=”the alternative image text”  width=”640″ height=”480″ loading=”lazy”/>


Lazy Load Function to Disable the Default WordPress Functionality for Lazy Load

Copy and Paste the Lazy Load Disable snippet into your Custom WordPress theme functions.php file. Save the Lazy Load Snippet Code go to Your Page and see how your Images and Videos in Iframe are without the Core Functionality for Lazy Load Function from WordPress.

/* Disable WordPress default image lazy load */
add_filter( ‘lazy-load_enabled’, ‘__return_false’ );


How you should use the default WordPress Lazy Load Functionality for your Pages, Posts and Other Post Types?

The function said itself how the Lazy Load works on your website. If you have Hero Image in Above the fold add the lazy only to media files that are not visible on first hit. Instead of adding Lazy Load for your Page Hero Image try to optimize and compress the image as much as you can, and is possible without decrease the Image Quality and use .jpg format images to load them much faster.

Then below the fold is coming all media images and videos which are below the fold can have the lazy loading class.

 

 


12/03/2021 by SEO Book Pro

Function – wp_title() – WordPress Code Reference

Article Details and Information
badge This article was written by SEO Book Pro | Published on 11:52 pm, Mon, 22 February 21
SEO Book Pro Headline Feed rss_feed
Do you have content that you want on SEO Book Pro?
Here are a few ways to submit it to us.

SEO | Website Audit | WordPress SEO | SEO Audit Tools

↑ Grab this Headline Animator

Subscribe to Our Newsletter

Powered by FeedBurner

Enter your email address:

Delivered by FeedBurner

What is the General Usage of wp_title() function

The wp_title() WordPress Function is used for display or retrieve page title for all areas of blog

By default, the page title will display the separator before the page title, so that the blog title will be before the page title. This is not good for title display, since the blog title shows up on most tabs and not what is important, which is the page that the user is looking at.

Read more information about the wp_title() function in the WordPress Codex Reference Page – wp_title()


22/02/2021 by SEO Book Pro
SEO Book Pro
5 stars
Technical SEO Audit
Quiet Valley Lane Sherman Oaks
Poway, CA 91403
8779 02354