This is a basic PHP error, you need to turn on debugging.
$count_slider
is an Object and not an Integer which is what you are checking for, since you seem to want to compare published posts anyhow , write it like:
<?php if($count_slider->publish > 1)
Related Posts:
- Getting the Next and Previous Posts Titles in the Sidebar?
- the_post_navigation seems to ignore same category filter
- Adding Post Counts to Menu (Nav) Programmatically?
- Navigation link to specific user page
- Post Navigation
- Restrict post navigation to current sub menu
- get_next_post() and get_previous_post() return wrong posts
- Disable most recent & view all (TABS) on nav-menu.php
- Is it possible to create a form post wordpress custom navigation link?
- remove older posts link [closed]
- How to create a submenu that will navigate through different posts in the same page
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- One menu for frontpage (one pager), and a different menu for posts
- Show only one page link in content pagination
- Highlight static blog page link in header
- Show posts count for Categories and Tags in wp_nav_menu
- Restrict the_post-navigation to same category?
- Navigate through the posts using keyboard arrows
- WordPress pagination and Post Navigation not working on home page
- Get current post’s nav menu name (term name)
- Add Text Domain To Post Navigation
- How to show next/prev link, when it’s not active?
- Possible?! A contextually titled back link
- Post navigation using date
- Blog posts pagination not working
- Change URL of previous posts and next posts link in WordPress
- get_next_post() not working with future post status
- Excluding category from post navigation in WordPress?
- Creating a link to the first post in a category
- Next / Previous post in a single category
- How to add navigation arrows to manually slide through posts?
- Can the_post_navigation() be outside of the loop?
- Output wp_link_pages as raw url
- Page and Posts loading as index page? Not loading the content
- How do I paginate posts page with $wpdb?
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- How can I get the first post THIS SAME CATEGORY?
- Show a page counter for pagination
- How can I merge a several related posts into one post?
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How to end the excerpt with a sentence rather than a word?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- ZIP up all images displayed in a [gallery] and offer as download link
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page
- removing inline styles from wp-caption div
- What is the use of to_ping and pinged column?
- How to use “Add link” pop up for a WordPress widget
- Remove Categories / Tags From Admin Menu
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Where is the old post permalink slug stored?
- How to Create Editable Blocks of Text for the Homepage?
- Keyboard shortcut for updating a page or post?
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- is it possible to get next_post_link
- Get post content by ID
- How to get post creation date?
- Update post counts (published, draft, unattached) in admin interface
- Function to execute when a post is moved to trash .
- How to get post ID of the current page/post inside a widget?
- add action only on post publish – not update
- How to display by default only published posts/pages in the admin area?
- How do you add Read more … link to posts?
- How to make comments work for a post loaded per Ajax?
- Is there an if statement that can determine if a post in the loop is the last post?
- Get current menu_order
- How to show related posts by category
- Changing the post date and time with function
- simply loop through posts