How to show all the posts you have published

When you have a blog or news website with many publications it is sometimes interesting for your visitors show the number of publications so you can see that there is a lot of material to choose from.

If you want to show this type of information it is easy to do so, let's see two methods .

Show the number of entries with a function

If you want to choose where to display the total number of entries we will do it in 2 steps . First add this function to your custom plugin or to the file functions.php of the active topic:

To finish, it is only necessary to add the function in the place where you want to show them, like this:

If you prefer do the same with a shortcode and show the total of entries in your pages or entries, then you can create the shortcode as well in your customizations plugin or file functions.php of the topic:

You just have to put the shortcode [total_entradas] in the entry or page where you want them to be displayed.

Show the number of entries with a plugin

If you feel more comfortable with a plugin then you can use Simple Blog Stats .

Once installed and active it offers shortcodes and a widget with which to show simple statistics of your publications, namely:

  • Total number of entries
  • Total number of pages
  • Total number of drafts
  • Total number of comments
  • Number of comments pending moderation
  • Number of comments approved
  • Number of registered users
  • Number of categories
  • Number of labels
  • Number of words of any entry
  • Number of words from all entries
  • Complete statistics in list mode

To find out what shortcode to use on your settings page you have them all and you can modify the way to display the content of the same, adding HTML tags or whatever you like.

For example, if you use the shortcode [sbs_posts] you can add modific Adores to decide what information to display, for example:

Where will show the entries of the category videos with the tag youtube of the content type ( custom post type ) movie that are published.

If you want to show all the statistics of publications, from the list that we saw above, then the shortcode to use will be simply this:

As you can see, it's simple, and it's a great way to show the potential of the content of your blog. I'm thinking if I put it because the truth is that it's cool to show what's published, especially if you have a lot, do not you think?

Loading …

It might help you too:

Say hello to new and regular customers in your WooCommerce online store

If I'm always insistent about how we should channel the shopping experience in an e-commerce it is in the personalization, in to accompany the client as much as possible by offering an adapted and personalized process .

Therefore, I usually use any tool that simplifies, facilitates and personalizes the purchasing process, and customer loyalty .

And this trick that I bring to you today is one of my favorites, because it's about creating a shortcode that greets new and regular customers, each one with different messages .

Then you can insert the shortcode in the pages you want from your online store, where you think it adds value.

The base code, which you must add to the file functions.php of the active topic, is this:

What it does is the following:

  1. Obtain visitor information from your online store with wp_get_current_user () [19659127] Then check if the user is connected and has filled in the field of Name in his profile to, in that case, show a message in which he greets him by name
  2. Otherwise, if he did not fill in his name in the profile, we use the alias, which is generated by WordPress from the username, and we salute him with the alias.
  3. Finally, if he is not connected, he will We are generic owners and we encourage you to create an account in our store or access it if you already have one. Note that I use the slug of the WooCommerce translation into Spanish (my-account), if you use another version or use another slug for the page of my account you should change it.
  4. We created the shortocode welcome

And from there, you can customize it too.

Once set to your liking, you only have to add the shortcode where you want it:

And your e-commerce will greet your visitors, whether they are connected or not. No.

Loading ...

May also help:

Internal Server Error / Internal server error

One of the errors that gives less information at the time of showing itself, and consequently more scare, is the terrifying one Server internal error or, if it leaves in English, Internal Server Error .

One would think that, being the server, the only solution is, then, to call server, the provider of your hosting, and is not badly thought.

In any case is a bloody mistake, because you know that something is not right, but it gives you no clue what is broken

But in reality does not have to be an error of your hosting, they can be many things so we are going to see the possible culprits of an internal error of the server and how to fix it in our web WordPress.

What causes an internal server error?

There are several po sibles culprits namely:

  • Plugins
  • Topic
  • WordPress installation
  • File .htaccess
  • PHP memory
  • Your hosting

To know what is the culprit my advice is to follow this sequence of actions:

Regenerate the file .htaccess

To eliminate the biggest suspect of an internal error of the server, Not the only one, I always start reviewing the file .htaccess .

The problem with this file is that there are many plugins that add lines so that sometimes guess what could have caused the problem is complicated especially if you have no knowledge of servers.

So the easiest, and sure, is to do the following:

  1. Access via FTP or the cPanel of your hosting and rename the current file .htaccess to something else, for example antigua.htaccess
  2. If you go to your site and the internal error of the server has been fixed, access your WordPress desktop, that is, at tudominio.es/wp-admin/
  3. Ve a Settings> Permanent links and Saves changes without modifying any settings.

What you have done is force WordPress to generate a new file .htaccess ] clean only with the WordPress rules, and by the way you know it was something in the old.htaccess what caused the error.

Now you have to check what was in that file , that's why you have the copy, which caused the error.

Disable the plugins

The next possible culprit is the plugins simply because can load functions that insert lines in the file .htaccess or break WordPress and all your installation if there is a problem of pr o

As we will not have access to the administration, access your installation of WordPress by FTP or cPanel and rename the folder plugins that is, change the folder that is in the path / wp-content / plugins / to something else, for example / wp-content / plugins_rotos /

What you do with this is disable all plugins automatically ]well you do not, WordPress, not finding the standard path where the plugins are installed.

Visit your site, and if the server's internal error has been fixed, rename the plugins folder to its original name. [19659006] Now you can access the WordPress desktop again, but with all the plugins inactive.

The following you already know, or imagine, right? You have to activate plugins one by one and checking which is causing the internal server error or Internal Server Error .

Once located, to deactivate it, rename your folder or delete it directly by FTP or the panel of your hosting, get in touch with the developer to let them know and offer you a solution, and look for an alternative plugin that offers the same functionality but without errors.

Changes theme … temporarily

If the plugins are not, also the active theme could cause an internal error of the server .

And it is that the themes not only make your web look beautiful and functional, also include (increasingly) internal functions, practically plugins which like your plugins can cause an internal server error.

Here the solution is similar to the previous one, and we will take advantage of ] a trick not very known WordPress, at least not as well known as I would like .

Again, access your installation via FTP or cPanel and check if, in addition to the currently active topic, you have installed a recent default theme of WordPress; I mean the Twenty Something .

If you do not have any of these installed download it from the official WordPress themes directory and upload it to your WordPress installation themes folder ( / wp-content / themes / ).

Once this is done rename the current theme folder to whatever you want . For example, from / wp-content / themes / my-theme / to / wp-content / themes / my-theme-broken / .

In a few seconds WordPress will detect that the current theme is not available in the path stored in the database and it will change to the first default theme that it finds installed, pure WordPress magic .

Now visit your site to check if this has managed to fix the server's internal error.

If so, talk to the developer, get a clean copy of your favorite theme or look for another that offers the same but without errors.

Upload the memory of PHP

] Another possible culprit can be that you have little memory for PHP a directive that is usually marked by default by hosting companies, but that we can manipulate to a certain extent.

If none of the above has worked this could be the problem, so we will try to force r memory available for PHP the programming language used by WordPress, its plugins and issues massively.

This is so because they can match processes on your website at a given time that exceed that available memory, and force a internal error of the server.

It can be, for example, an automated task of a plugin that coincides with the publication of an entry or go to know.

Whatever it is, we will increase the limit of the memory of PHP to check if it was that. To achieve this we have to try to bypass the limits imposed by the server, which we can achieve in several ways.

Increase the PHP memory limit from .htaccess

Add to the file .htaccess the following line :

Save the changes and check to see if the server's internal error was fixed.

Increase the PHP memory limit from wp-config.php

If the above does not work for you, delete that line and add this one to your file wp-config.php :

Again, save the changes and check your website to see if you no longer have the Internal Server Error of the noses.

Increase the memory limit to PHP from php.ini

If you have full access to all the routes of your hosting, locate the PHP parameter configuration file, called php.ini and change the PHP memory limit line to these values:

If not you have access to the file path php.ini original you can create yourself one in the folder wp-admin and add the following:

And if all else fails … call your hosting

If none of the above solves the problem talk to your hosting provider, with your hosting and inform them. They have access to all your server, to the error logs and can more easily determine what caused the problem .

In addition, you can increase, even temporarily, the available memory, so you can review the steps that we have seen previously.


I hope this guide has helped you solve some Internal Server Error or internal server error . If that's the case, share how you managed it with everyone, so you'll help others too.

Loading …

That may also help you:

70% discount on all hosting plans @SiteGround_es and renewals #CyberMonday • WordPress support

You have to take advantage of it, since there is a Cyber ​​Monday, better check if we can save a good amount of euros right?

And look, I love that my hosting has today offer 70% savings on all plans, and as always domain and migration included and also for renewals .

I always recommend SiteGround, simply because they are the best, but not I would have chosen them to promote them, but take advantage today this opportunity to hire the best possible hosting at an incredible price .

Come on, give the following banner and then you decide sure there is some project out there that will not hurt him save 70% of hosting right?

Divi and all the themes and plugins of ElegantThemes with a 25% discount #CyberMonday • WordPress Help

Only during this week all the themes and plugins of Elegant Themes, including of course Divi, Extra, Bloom and Monarch, have a discount of 25% on any type of license .

If you have that acquiring a license for you or any project now is the ideal time to do it, and save 25%, either in the developer's license or the lifetime license, which would be the best option clearly.

To access this discount you just have to access this page and choose the license you want to acquire. Take advantage now, then the discounts – if there are any – are always much smaller.

Divi Tutorial: How to rename projects

/ * New CPT, slug and Divi taxonomies * /

function child_et_pb_register_posttypes () { $ labels ] = array ( 'add_new' = > __ ( 'Add new' 'Divi' [19659024] )

'add_new_item' = > __ ( 'Add new thing' 'Divi' )

'all_items' = > __ ( ' All things' 'Divi' )

'edit_item' = > __ [19659004] ( 'Edit thing' 'Divi' ) [1 9659022] 'menu_name' = > __ ( 'Things' 'Divi' )

'name' = > __ ( 'Things' 'Divi' ] )

'new_item' = > __ ( 'New thing' ] 'Divi' )

'not_found' = > __ ( 'There is nothing ' ' Divi ' )

' not_found_in_trash ' = > __ ( 'There is nothing in the bin' 'Divi' ) [19659004]

'parent_item_colon' = > '' [19659000]

'search_items' = ]> __ ( 'Search for things' 'Divi' )

'singular_name' = > __ ( 'Thing' 'Divi' )

' view_item ' = > __ ( ' See thing ' ' Divi ' ) [19659022] ) ;

$ args = array (

'can_export' = [19659014]> true

'c " = > 'post'

'has_archive' = > true [19659000]] ,

'hierarchical' = > false [19659000]

'labels' = > [19659024] $ labels

'menu_icon' = > 'dashicons-images-alt'

] 'menu_position' = > 5

'public' = ]> true

'publicly_queryable' = > true

'query_var' = > true [19659000]

'show_in_nav_menus' = > true [19659004]

'show_ui' = > true [19659000]

'rewrite' = > apply_filters ( 'et_project_posttype_rewrite_args' array (

'feeds' = > true [19659000]

'slug' = > 'things'

'with_front' = > false

) ) [19659004]

'supports' = > array ( 'title' 'publisher' , 'thumbnail' 'excerpt' 'comments' 'revisions' 'custom-fields' [19659024] )

) ;

register_post_type ( 'project' apply_filters ( 'et_project_posttype_args' $ args ) ) ;

$ labels = array (

'name' = > _x ( 'Categories' 'Category name of the thing' 'Divi' [19659004])

'singular_name' = > _x ( 'Category' 'Name in the singular of the category of the thing ' ' Divi ' )

' search_items' = > __ ( 'Search for categories' 'Divi' )

'all_items' [19659014] = > __ ( 'All categories' ' Divi ' )

' parent_item ' = > __ ( ' Top Category ' ' Divi ' ) [19659022] 'parent_item_colon' = > __ [19659004] ( 'Top category:' 'Divi' )

'edit_item' = ]> __ ( 'Edit category' 'Divi' )

'update_item' = > __ ( 'Update category' 'Divi' )

'add_new_item' = > __ ( 'Add new category' 'Divi' ) ,

'new_item_name' = > __ ( 'Name of the new category' 'Divi' [19659024] )

'menu_name' [19659] 024] = > __ ( 'Categories' 'Divi' )

[19659004]) ;

register_taxonomy ( 'project_category' array ( 'project' ) ] array (

'hierarchical' = > true

'labels' = > $ labels

'show_ui' = > true [19659000] ,

'show_admin_column' = > true

'query_var' = > true [19659004]

) ) ;

$ labels = array (

' name ' = > _x ( ' Tags ' ' Name tag of the thing ' ' Divi ' )

' singular_name ' = > _x ( ' Label ' , 'Name in singular of the tag of the thing' 'Divi' )

'search_items' ] = > __ ( 'Search tags' ' Divi ' )

' all_items ' = > __ ( 'All tags' 'Divi' )

'parent_item' = > __ ( 'Top label' 'Divi' )

'parent_item_colon' = > [19659003] __ ( 'Top label:' 'Divi' )

'edit_item' [19659014] = > __ ( 'Edit label' 'Divi' )

'update_item ' = > __ ( ' Update tag ' ' Divi ' )

] 'add_new_item' = > __ [19659004] ( 'Add new tag' 'Divi' )

'new_item_name' = ]> __ ( 'Name of the new label' 'Divi' )

'menu_name' = > __ ( 'Labels' 'Divi' )

[19659004]) ;

register_taxonomy ( 'project_tag' array ( 'project' ) [19659004] array (

'hierarchical' = > false

'labels' ] = > $ [1965900] 8] labels

'show_ui' = > true

'show_admin_column' = ]> true

'query_var' = > true

) ]) ;

$ labels = array (

'name' = > [19659003] _x ( 'Designs' 'General name of design type' 'Divi' ) [19659022] 'singular_name' = > _x ( 'Design' 'Unique name of the design type' [19659004] 'Divi' [19659024] )

'add_new' = > _x ( 'Add new' [19659012] 'Layout item' 'Divi' )

'add_new_item' = > __ ( 'Add new design' 'Divi' )

'edit_item' = > __ ( 'Edit design' 'Divi' )

'new_item' [19659024] = > __ ( 'New design' 'Divi' )

[19659023] 'all_items' = > [1 9659003] __ ( 'All designs' 'Divi' )

'view_item' ] = > __ ( 'View design' 'Divi' )

'search_items ' = > __ ( ' Search Designs' 'Divi' )

] 'not_found' = > __ ( 'There is nothing' 'Divi' )

'not_found_in_trash' = > __ ( 'There is nothing in the bin' 'Divi ' )

' parent_item_colon ' [19659014] = > ''

) ;

$ args = array (

'labels' = > $ labels

'public' = > false

'can_export' = > true

'query_var' = > false [19659000]

'has_archive' = > false

'capability_type' = > 'post'

'hierarchical' [19659014] = > false

'supports' = > array ( 'title' [19659004] 'editor' 'thumbnail' 'excerpt' 'comments' 'revisions' [19659004] 'custom-fields' )

) ;

register_post_type ( 'et_pb_layout' apply_filters ( 'et_pb_layout_args' $ args ) ) ;

}

function remove_et_pb_actions () {

remove_action ( 'init' [19659012] 'et_pb_register_posttypes' 15 ) [196590] 04];

}

add_action ( 'init' 'remove_et_pb_actions' ) ;

add_action ( 'init' 'child_et_pb_register_posttypes' 20 ) ;

AMP on WooCommerce

Although there will always be someone who complains what is clear is that the AMP pages are here for the moment to stay for their multiple advantages for the user .

And if, until now, they were mainly designed for news pages, they also have important advantages for an e-commerce store, and of course for your online WordPress store with WooCommerce .

Why should you install AMP in WooCommerce?

You should be aware that most people are currently browsing from mobile and not always in high-speed networks such as 4G, but sometimes in 3G and even 2G.

Most Internet traffic is mobile and AMP is essential for the strategy of your online store #ecommerce Click to Tweet

] So Google, knowing this, promoted the use of accelerated pages for mobiles, or AMP precisely to solve the most important problem of mobile navigation, speed.

AND AMP is perfect, because it loads pages with only the essential which gets very fast load pages, in less than 1 second almost always.

Another good side effect of the use of AMP is that reduces the bounce rate, which results in a better user experience .

There are many more reasons of course, of which I have already spoken on other occasions why you should be using AMP .

In summary, these are the reasons why you should also use AMP in your e-commerce:

  • Basic for good mobile SEO, because Google prevails over AMP pages.
  • Reduces the rate bounce site
  • Makes pages (and products) ca Rguen faster.
  • Improve your website's positions in Google results.
  • Facilitate tracking of mobile user behavior.
  • Google recommends, what's more, Google loves it.
  • They load in the Google cache, which accelerates them even further.
  • They have a special visualization in the mobile search results, with large image thumbnails and in prominent carousel.
  • They have a user interface adapted to mobile. [19659014] Improvement in CTR

AMP and e-commerce

Google created accelerated pages for mobile (AMP) especially for news sites and blogs. And the reality is that get this type of content loaded very quickly and very optimized for mobile .

Now, although many people think that AMP is only for news and blogs the In fact, AMP can also be adapted to e-commerce sites .

In fact, Google has stated the following:

AMP is perfect for an e-commerce since the AMP pages do that the web loads faster, and fast pages help conversion into sales.

According to the studies of KISSmetrics.com an e-commerce that makes $ 100,000 a day would lose 2.5 million dollars each year for each second of delay in the loading of your pages.

Put clearly, look at this image of the results analyzed by Womp Mobile:

In short:

  • AMP pages convert 105% more.
  • AMP pages reduce the bounce rate a 31%.
  • AMP pages increase CTR by 29%.

I know that surely your e-commerce does not sell that much but are you going to risk losing sales through a slow website?

AMP converts 105% more, reduces the rebound rate by 31% and increases the CTR by 29%. What are you waiting for? #seo #ecommerce Click to tweet

Okay you can speed up your WooCommerce store with the guides I've posted here in WordPress Help but AMP takes mobile load optimization to the next level.

If you want data on why you should offer accelerated pages in your e-commerce I leave you a summary:

  • 50% of users expect a web to load in less than 2 seconds.
  • 50% of the users leave a website that takes more than 3 seconds to load.
  • 79% of users will not visit a slow website again.
  • 44% of those users will tell their friends not to visit a slow website

And, again, if you want reasons for using AMP in e-commerce, here are a few:

  • AMP pages load 4 times faster.
  • AMP pages consume 10 times less data
  • AMP pages load in less than 1 second.
  • 90% of administrators e sites with AMP have checked more CTR, less bounce rate and more downtime.

If eBay is adopting AMP, why do not you?

If you want an example of where you're going the market aims: eBay is massively adopting AMP and already charges more than 8 million pages in this technology .

eBay already serves more than 8 million products in AMP, and your #ecommerce? Click to tweet

The argument is just what we are talking about, speed up the loading of your product pages, categories, etc. .

The product pages in AMP are clearer , easier to navigate for the mobile user, and above all, much faster.

And what does Google say about putting AMP in ecommerce?

I understand the question, because in principle it was only for news, but not only is delighted that AMP is used in ecommerce but has even published a series of tips and guidance on how to implement and use it successfully .

Ok, I'm convinced how do I add AMP to WooCommerce?

The first thing is to install the AMP base plugin, which you will find in the plugin installer of your WordPress.

Install the base of AMP

First of all look for AMP e install and activate the AMP plugin from Automattic, which is the base that WordPress needs to create and Accelerated pages for mobiles

Only with that AMP pages are created for your entries which will be the only type of content you will recognize.

So ] now it's time to activate AMP for WooCommerce products .

Glue for Yoast SEO & AMP

If you use Yoast SEO plugin you should already know that, in addition, you must install the plugin Glue for Yoast SEO & AMP which solves AMP integration errors with Yoast, but also includes the ability to activate AMP for products on its settings page.

The problem is that, although it creates the AMP pages for your products actually are merely informative, and can not be purchased directly not even remotely.

So forget about this option, Glue for Yoast SEO & AMP is not enough to create product pages in AMP with which to sell something . What's more, disable that possibility if you use Yoast.

AMP WooCommerce

There is another plugin, also free that, yes, creates AMP pages for your products that you can sell with. I mean AMP WooCommerce .

Install it from WordPress and activate it. There is nothing to configure it just works.

Once active you can see your products in AMP, with super fast loading, ready to sell.

WordPress WooCommerce AMP

This plugin, available in Envato is by far the best option to add AMP to WooCommerce .

It is very simple to configure and also allows create AMP pages of your product categories, also vital in many e-commerce stores for your sales.

Tips for implementing AMP in an ecommerce [19659024] Not all AMP pages are created the same.

Here are some tricks and good practices to create attractive, fast AMP pages that turn your visits into sales.:

  • Selective.] My advice is that you start implementing AMP on the pages with the greatest impact on organic searches. Depending on the site it will be the cover, the categories or the products. A good plugin will let you choose where to create them.
  • Eye with the plugins. If you use a plugin that generates AMP pages from predefined templates, review the way users will see them. Above all make sure that they do not change the general appearance of your online store, to avoid scares and distrust on the part of your potential buyers, prevents them from fleeing for this reason. Choose a plugin that allows you to customize the main aspects of your AMP pages.
  • Keep the brand image. Make sure that the AMP pages maintain the styles, logo, colors, etc that the rest of the web.
  • Make sure of the synchronization. As I tell you, be careful with the plugins for design reasons I ask you to make sure that the AMP pages are synchronized with your page canonical in case of changes in the products. Do not trust, when you make changes empty the cache and check your AMP pages
  • Full functionality . An AMP page should not be a decaffeinated version of its non-AMP counterpart, but a faster and better version for mobiles. If in your store you have filtered by attributes, featured products, selection options or whatever helps you sell more, your AMP pages should have it too.

Conclusions

  • Should you install AMP in your e-commerce? Yes, of course.
  • When? Right now.
  • What did I win? Fast product pages, satisfied customers, more sales.
Loading …

That may also help you: