Wordpress SEO - What are you looking for?

If you're looking for answers to SEO or wordpress related questions, type in a phrase and wait for hints or click enter! The results also show links to external sources.

161 articles in the database

Display the number of WordPress resources

[ Article content is protected by Plagiashield ]

In today's post I've put together a few short pieces of code that allow you to display in WP the number of individual resources in our database websites.

Display the number of published posts

publish;
echo $total_posts . ' articles. ';
?>

Display the number of published posts of a specific type

publish;
echo $total_posttype . ' articles of type 1. ';
?>

We modify "type-post1" in line 2 and text after this number on line 4

Display of the number of published pages

publish;
echo $total_pages . ' pages. ';
?>

Display of the number of accepted comments

approved;
echo $total_comments . ' comments. ';
?>

Displaying posts in a specific post

get_comments_number must be in loops.

Display of number of users

users.';
?>

Display the number of attachments in the post

$post->ID));
$nbImg = count($attachments);
echo 'There are '.$nbImg. images.'
?>
Wojciech Wladzinski

O Wojciech Wladzinski

I have been dealing with SEO industry since 2008. At co day senior SEO specialist in the company Seogroup. I create and optimize large websites like and smaller websites. I am particularly fond of the environment WordPresswhich, despite popular belief, is not just a blogging platform.
  • Internal Links and Sematics

  • Link building
  • Sematics
  • Link building has never been easier. Hundreds of link possibilities in one click.
  • See

[ Article content is protected by Plagiashield ]

SEMRush - the best tool for SEO and PPC.

en_USEnglish
Read previous post:
How to disable notifications for a specific user/email?

Creating a WP-based website for someone very often the case is that we become its administrator. At the...

Close