Articles of posts

datepicker value in mysql

I am using a plugin WP-Types for custom post types in which there is a option to create custom fields in which i created one date field for my requirement. Now what happens when i add any date into it .. It will store some kind of wired value ( for me ) in mysql […]

Unable to render custom field after attempt to generate a list of recent post in page template

When I try to render a list of recent post type either by using WP functions or WP query, I’m not able to render the custom fields that I have to render bit after. The content of box with class feat-block ends up empty every time when using one of following commands: $recent_news_posts = wp_get_recent_posts($news_post_settings); […]

Modify WP_Post before processing

I am looking for a way to modify WP_Post object before it’s processed and displayed on the page. Reason – I built my site when WP was still in version 2.0, or even earlier. I didn’t attend to it for a couple of years, but now I’m back making updates. First version of my site […]

Article content navigator in wordpress like mbaskool website

Is there any way to allow navigation in an article within same post in WordPress. or any such plugins ? Because i searched a lot, but could not find a way. For example : Check this link where we can navigate through top 10 items of same post

l accidentally permanently deleted a Draft. There's any way I can recover it?

I recently started a blog and I was about to finish my second Post. I was cleaning up some stuff and decided to empty my Trash. I wasn’t paying much attention to it because I wasn’t expecting my Draft to be there. I accidentally deleted it. There’s any way I can at least visualize it […]

Show number of posts by logged in user

How to display the number of posts written by the logged in user. Here is what i got from the codex so far <?php echo ‘Number of posts published by user: ‘ . count_user_posts( 5 ); ?>

How does WP decide how to display a page

I am new to WP. I tried reading up as much as I possibly can online, and via browsing through the files. As far as I can tell, no physical pages/links are stored on the disk, so when a page is created, the data is stored in the wp_posts table, and the post metadata is […]

Cannot implement byline into posts container in single.php

I tried inputting PHP byline code in page.php, single.php and page-sidebar.php inside of the loop, under the title. As I thought, the byline appears on pages but not on posts. Also, I noticed my single post pages do not contain a loop like most other themes. Here is my PHP code: <p><?php echo “By “;?> […]

How do I limit the number of posts displayed to one?

I have searched Stack and the codex but can’t find a simple solution for limiting the number of posts returned to one using the following: <?php query_posts(‘cat=24’); ?> <?php while (have_posts()) : the_post(); ?> <?php the_field(‘alert’); ?> <?php endwhile;?>

Load widget only on blog posts

I am attempting to ensure a widget is only loaded on blog post pages. I tried using $post_type = get_post_type( $post_id ); inside the widget function of my widget class. However, upon loading pages like the homepage, ‘archives’, ‘categories’ etc. . . the post type is always ‘post’. The only exception is when I create […]