0
votes
1answer
19 views

I want my wordpress loop to only display posts of the standard format

I currently have the following php code for the content loop on my homepage. <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); ...
4
votes
1answer
87 views

Inject post (from specific category) between posts in Loop

I would like to add a post (from specific category) between posts in the WordPress Loop (such as 'Sponsors'). Example: P P P S P P S P P S P P How can I achieve this? I am a beginner with coding, so ...
0
votes
2answers
20 views

Syntax error when I try to insert my loop into an unordered list? [closed]

I am very new in PHP and WordPress development and I have the following problem trying to insert some HTML code into the posts loop. I tried something like it: <?php if (have_posts()) : ...
-1
votes
0answers
7 views

'Latest Video Post' does not post

My 'Latest Video Post' at the bottom/ footer of the page does not post videos. It is linked to my 'Articles in Boosting Creativity' page. I don't know anything about writing or reading code. I went to ...
1
vote
1answer
89 views

Some doubts about how the main query and the custom query works in this custom theme?

I am pretty new in WordPress theme development and I'm not so into PHP (I came from Java and C#) and have the following situation in this custom theme As you can see in the homepage I first show a ...
0
votes
1answer
28 views

What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?

I am pretty new in WordPress theme development and I have the following doubt. I am working on this custom theme: http://lnx.asper-eritrea.com/ Into this website upper horizontal main menu I have a ...
0
votes
1answer
35 views

Automatically create a loop for post ID

I am having trouble generating a loop for my post. The JS calls the slide_ID which then needs to display each slide-ID in numeric order for it to work. Example for slide-1 to scroll to its next slide ...
0
votes
1answer
36 views

Create Div Wrapper On 3rd Iteration Or When Query Loop Items Run Out

I'm running into an issue.. I've written a code inside a loop so that it creates a new box every 3rd iteration in the loop. It does this nicely, however for example if I have 4 items in a full query ...
0
votes
1answer
56 views

WP Knowledge Base Theme bug - Subcategories and Articles, Need to change WP_Query

I'm using the WP Knowledge Base theme, which is almost perfect for the project I'm on, but I discovered an unfortunate bug. On the home page, if you have both SubCategories and loose Articles under a ...
0
votes
1answer
105 views

How to Fix an Archive.php That Displays All Posts?

I am currently working on developing my first large-scale WordPress powered site, and I have run into a major problem in my archive.php file. It loads all posts, rather than the categories/tags that I ...
1
vote
2answers
69 views

Guidance with The Loop for CMS

Maybe I'm going about this the wrong way but this is my scenario... I would like to use WordPress as a CMS rather than a blogging platform. I have a website that will have somewhere between 25-50 ...
0
votes
0answers
38 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
0
votes
1answer
52 views

Wordpress loop is not working

Can anyone tell me why this wordpress blog is looping the header and banner over and over? It seems like instead of just looping the post it is looping the whole page. This code is inside of my ...
0
votes
3answers
71 views

WP_Query fails despite having 1 post

I'm doing a typical custom post type query with args like this: array (size=4) 'post_type' => string 'custom_post_type' (length=15) 'post_status' => string 'publish' (length=7) ...
0
votes
0answers
30 views

Nested wp_query loop doesn't show connected posts

I have have a wp_query loop nested in another wp_query loop. The first loop queries the latest movies. The second loop queries the persons connected to each movie from the first loop (movies and ...
0
votes
3answers
41 views

Limit ads appearing more than three times

I am using the following code in content.php to repeat an ad insertion. Ads are inserted in the middle of every 2nd row in a grid of thumbnails. There are 3 thumbnails per row. <?php else : ?> ...
0
votes
1answer
53 views

Including all post id's of a custom post type into an array

For my single.php (products.php), I try to build a navigation via which the user can switch between products based on the meta key "price". I want to put all id's of the products post type into an ...
0
votes
2answers
58 views

have_posts() execution failure

I wanted to create a loop which displays search results in search.php file. I followed all of the instructions in the WordPress Codex tutorial located in here: https://codex.wordpress.org/The_Loop ...
0
votes
2answers
63 views

Echo array value

I have following query to store data for last week entries in database: for ( $i; $i <= 7; $i++ ) { $val[$i]= $wpdb->get_results( "SELECT COUNT(`order_total`) AS 'Total' FROM vm_orders ...
0
votes
0answers
58 views

Remove entry content from homepage index with infinite scroll

I have a WP theme (built on top of Genesis) and I'm having a problem with posts that are loaded on the homepage index with infinite scroll. Essentially, I'm only showing the article title, date, ...
-1
votes
1answer
130 views

Excerpt all post content Content Same Size without word cutting off

On my category page there are list of 24 posts with title and excerpt content. To display specific lengths of content, I am using substr function. Now the issue is that each post excerpt content are ...
0
votes
0answers
39 views

Problems With Query and/or Template Part and/or PHP

I'm trying to show only the last article. I made content-latestnews.php and it worked before meddling with queries. Template part was shown, but after I tryed to show the actual content it would show ...
1
vote
2answers
140 views

Load wordpress content in other domain

I've made some researches on google but can't get the right answer. I need to get my wordpress loops outside a domain using php file. For example: I have a website hosted with www.mysite.com using ...
0
votes
1answer
31 views

Two loops in one function

I am trying to get this function to work with jquery tabs, and I've gotten some of it to work. Right now the function correctly puts out the <ul> <li>item1</li> ...
1
vote
1answer
86 views

Dynamic Stylesheet loads but doesn't finish

I am creating a website for an architect with large images being a main feature of the site. Given the potential size of the images I wanted to have a way to create responsive image sizing (and of ...
0
votes
1answer
119 views

List all anchor links on a page

I was trying to make a navigation menu of all the anchor links on a page (similar to wikipedia) but couldn't find out how. I tried to find a plugin that could do it, but they only listed the anchors ...
0
votes
1answer
50 views

Php code error in wordpress if else statements [closed]

I have created an if statement inside the "else" of an if/else statement.However the code below the function does not run.When i remove the function the code below the function runs.Could you please ...
0
votes
1answer
31 views

Why in my theme I can't see all the statics content under the posts?

I am pretty new in PHP and I have the following problem, I am developing this WordPress problem: http://onofri.org/WP_BootStrap/ As you can see it is shown the unique post present on my blog (the one ...
0
votes
1answer
68 views

First post article different on Archives template

Hi I'm trying to make the first post article in the list different for the archive template. Basically they'd all be in order descending, but the first post in the list would be styled differently. ...
0
votes
1answer
79 views

ACF loop and php formatting

The following php will loop through each page and then output ALL of the ACF custom fields sequentially. What I need help formatting is a conditional statement that places all $fields, except ...
0
votes
1answer
34 views

How to display thumbnail if post is assigned one otherwise not

I would like to display the most recent post in a block, and if the post is assigned with a thumbnail I would like it to be shown on the left to the post content. This is my code that I have been ...
0
votes
1answer
70 views

How to add title attribute to archive items

How can I have the title attribute to each listed archive item, so when I hover an item, it says: view all posts in archive: '' $html = wp_get_archives( array( 'show_post_count' => false, ...
0
votes
1answer
64 views

How to have post count after each listed category

How can I have a post count after each listed category with the following function? Also, how can I apply this with wp_get_archives and also with the same option as the below function? <ul> ...
0
votes
1answer
46 views

How to add ASCII symbol after each recent post [closed]

How do I add an ASCII code after each recent post list item? <?php $args = array( 'numberposts' => '2' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as ...
0
votes
1answer
71 views

Compare Two Custom Post Types Using The Same Custom Taxonomy

I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it ...
0
votes
1answer
31 views

Inserting A Feed and Sidebar into an HTML Page

I have a website I've built and the last step is to configure the blog page. My html and css is solid but my php and wordpress development knowledge is almost non-existent. I don't need a dynamic ...
0
votes
1answer
64 views

Posts without featured image using other post's featured image

I am using the following code (see bottom) to display a custom post called 'artists'. I am also using <?php if (has_post_thumbnail( $post->ID ) ) so I can set the background of a div using the ...
0
votes
0answers
19 views

Styling every second Post differently? [duplicate]

I wanted to style every second post inside of a query post and I found a solution which nearly works. the thing is: it outputs just two posts (older ones will be igrnored) but i want to output ALL ...
0
votes
3answers
761 views

How can I loop into two different DIVS without repeating the DIVs

I am having a little trouble trying to figure out how I can accomplish this: I have a container with two colums in it, a right and a left column. Each column will have 3 posts with a short excerpt ...
0
votes
1answer
46 views

How can I put a custom field as the link of a button shortcode?

I have been working on a custom page template, and cannot seem to figure out how to have a custom field for URL's as the link for a button in the loop. Here is my code <?php echo ...
0
votes
1answer
49 views

Pagination on Custom Loop

I want to style the latest post differently than all the other posts in a category on a custom page. So far I have this code below which does exactly that: <?php if (have_posts()) : ?> ...
0
votes
1answer
24 views

Pagenav Not appearing on custom Template

I've just finished building a custom page template using the following code. The issue is the pagenav doesn't work - But works on every other page with multiple posts. I want this one to appear if ...
0
votes
3answers
230 views

Custom Loop Pagination on WordPress

I'm trying to create a magazine style website. For this particular page (not homepage) I'd like to fetch the latest post and style it one way (style1). For all the other posts I'd like to just display ...
0
votes
1answer
27 views

Error trying import one category on page

I'm trying to post on this page only posts from category "Fotos Abertas" but I'm not getting, is showing all categories. Is there any error in the code of my template? <?php /* * Template ...
0
votes
1answer
97 views

What is the best way to get the first few post from WordPress in different divs using a loop?

I got the first post using the loop but I can't get the second post. I would like every post to be in a different div but the same style as the first post. To do this, I would probably need to ...
0
votes
1answer
171 views

2nd page displaying the exact same posts as my first page (minus the very first post)

Site Links: http://manofmany.com & http://manofmany.com/page/2/ I'm seeing my 2nd page displaying the exact same posts as my first page (minus the very first/latest post). All other pages 3,4,5 ...
0
votes
1answer
268 views

why is this content-template not showing any of my blog-entries?

i'm using the blogolife-theme on wordpress 3.6.1 my template looks like this: <?php /* Template Name: Template One */ ?> <?php /** * A custom template file. * @package WPLOOK * ...
-1
votes
1answer
79 views

How to handle parent and child pages?

I want to list episodes of a series I am making of instructional videos with content. The patent page "series" will list episodes weekly. Ie: episodes 1, 2, etc. I'm thinking to setup a template to ...
0
votes
2answers
100 views

Transient Loop Not working as expected

So I created a transient object that used get_posts() to get a series of posts based on some argument. Well the transient was stored - it was created - YAY - now I tried to write this loop: public ...
0
votes
2answers
466 views

Two posts in same div - WP loop

I would need the following in Wordpress: <div class="posts-wrapped"> <div id="post-1" class="post"> <h1>Title 1</h1> </div> <div id="post-2" ...