Articles of posts

Restrict displaying posts to the poster itself (in Back-end)

How can I filter posts in the Back-end so that logged in user sees only her/his own postings and not from others on the listings. My CPT declaration: $args = array( ‘labels’ => $labels, ‘description’ => ‘Test plugin.’, ‘public’ => true, ‘menu_position’ => 10, ‘supports’ => array(‘title’, ‘excerpt’, ‘comments’, ‘author’), ‘has_archive’ => false, ‘menu_icon’ => […]

Proper way of establishing custom landing pages in WordPress

Within WordPress 4.6.1, with the TwentySixteen theme, I have 2 general questions in regards to establishing a landing page. From within my child theme folder, where and how do we create a new page to be the new landing page of our site? This page will have a custom coded look and feel. Where in […]

Un-highlight Blog Menu Item when Category Menu Item is Selected

On a site I’m working on, I am using a blog category called ‘Podcast’ for any podcasts that are posted. I have this as a menu item as pictured. My only issue is, that when I click podcast (just a link to /blog/category/podcast/ it highlights both the Blog and Podcast menu items (pictured above), which […]

Why excerpt is Displaying same in Random Posts list

I am tryping to fetch random posts list in single.php above footer. Titles of the post displaying randomly and are unique in <li> but the excerpt is same for every post title (i.e., same excerpt of post content ‘single.php’). First tried this: <ul class=”random-list”> <?php $posts = get_posts(‘orderby=rand&numberposts=12’); foreach($posts as $post) { ?> <li class=”col-xs-6 […]

how to make an array of post id's in is_single

For example, the code below only shows the page challenge for post id 2578. However i got 8 other posts that should have the same layout. All others should have the layout from challenge-2 etc. I was hoping i could do that by just adding commas between the ID’s. like 2578, 2579, 2580 but that […]

How to Query in WordPress which shows Alphabetic Posts?

Hello i’m currently displaying all the brands in my website. Brand is a custom post type. I have now created a list which is only showing A, B, C, D, E … Z, As u can see in the screenshot. What i actually want is whenever i click on the alphabet A, it should show […]

Post: how to set created date after post has been published

For example: i click create post at Friday i edit post data i left this post opened and not published till Monday i publish this post at Monday as published date i see Friday. But why? I want to see as published date Monday, not Friday. What and where should i change? I’m using WordPress […]

How to get the form code from the edit page of a specific post?

On a site I’m working on, in the profile page – for example – I have to display the content from a few custom posts (additional details, location details, billing). And instead of having the user click Edit and change the page to the ‘edit page’ for that particular post and then come back to […]

Site URL is not redirecting correctly

I have changed the site URL and home URL in the settings. When I click any page on my website, it is not redirecting properly. If I put the IP address in the place of site URL it is working properly. How to solve this issue?

If there is only one post (show elements) else (show other elements)

So I’m looking for some help on an if statement: <?php if(i dont know what to put here. [something like is-single-post]){ ?> <div class=”one post”></div> <?php }else{ ?> <div class=”multi posts”></div> <?php } ?> Also this is a custom post type with a slug of post [ don’t ask ( ͡° ͜ʖ ͡°) ]. So […]