sixfootjames
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to loop through custom fields for a staff directory listAnyone able to help with this please?
Forum: Fixing WordPress
In reply to: WordPress media images in one location, not dated by folderThat worked, thanks again Esmi….!
Forum: Fixing WordPress
In reply to: WordPress media images in one location, not dated by folderThanks Esmi. I will look at that now ??
Forum: Fixing WordPress
In reply to: How to loop through custom fields for a staff directory listI am then assuming there must be a way to loop through sub pages and fetch all custom fields in those pages?
Forum: Fixing WordPress
In reply to: How to loop through custom fields for a staff directory listIt seems there is no categories associated with pages specifically. Is there any other way to loop through all the staff pages and know what department they might be in?
Forum: Fixing WordPress
In reply to: Custom templates within WYSIWYG WordPress editorEsmi…that plugin is the bomb! Thanks.
Forum: Fixing WordPress
In reply to: How to lock or hide certain posts from WP users?Thanks keesiemeijer. I will try that ??
Forum: Fixing WordPress
In reply to: How to pull content from another database into WordPressAnyone please?
Forum: Fixing WordPress
In reply to: Custom templates within WYSIWYG WordPress editorThanks ESMI, I will have a look into that now ??
Forum: Fixing WordPress
In reply to: How to pull content from the DBquery_posts( ‘p=5’ );
Seems to do the trick ??
Forum: Themes and Templates
In reply to: How to use html tags within the loopEsmi…thank you so much! I will have to put in the effort to learn more about PHP when this project is complete.
Much appreciated!
Forum: Themes and Templates
In reply to: How to use html tags within the loopIt seems my above posted rendered the [strong] tags.
essentially, what I need to do is wrap the_tile(); like this in my php
[strong] the_tile();[/strong]
Forum: Fixing WordPress
In reply to: How to use a WP Page and pull Posts into that pageThanks Fonglh
Forum: Fixing WordPress
In reply to: How to use a WP Page and pull Posts into that pageFinally managed to figure it out.
<?php
query_posts(‘cat=5&posts_per_page=1’);
if (have_posts()) : while (have_posts()) : the_post();
the_title();
the_content();
endwhile; endif;
?>And you can have multiple loops on a page. Didn’t know that ??
Forum: Fixing WordPress
In reply to: How to use a WP Page and pull Posts into that pageThat’s already a great start, thanks Fonglh!
Based on this page where I am learning from then, this is what I have so far.
———————————————————————–
<h1>The Content</h1>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else: ?>
<?php endif; ?>———————————————————————–
<h2>The post by Category Name</h2>-
<?php
- <?php the_title(); ?>
- <?php the_content(); ?>
$args = array( ‘numberposts’ => 1, ‘category’ => ‘News’ );
$rand_posts = get_posts( $args );
foreach( $rand_posts as $post ) : ?><?php endforeach; ?>
———————————————————————–
If I use the_content() it is not pulling the content of that particular category (News) but the main content of the HOME PAGE.
I also don’t know if I am using ‘category’ correctly? I have two categories, News and Hello, for test purposes and if I switch to Hello, it still pulls in the latest News post.