Help with codex
-
Trying to embed wordpress into my existing website. I’ve made a little headway.
First code
Grab blog post
<?php $posts = get_posts('numberposts=10&order=ASC&orderby=post_title'); foreach ($posts as $post) : setup_postdata( $post ); ?> <h2><?php the_title(); ?></h2> </br> <?php the_content(); ?> <?php the_date(); echo "<br />"; ?> <?php endforeach; ?>
Changes id like trying to get it to look like this https://wbpreview.com/previews/WB07233L7/blog.html#
How can I add the poster and comments like they have?Next code grab page content by id this pretty much works they way I want it but I cannot get it to display the date like the above code. Also would like to limit content length and then and the read more button like the above site.
<?php $id=31; $post = get_post($id); $title = the_title(); the_date(); $content = apply_filters('the_content', $post->post_content); echo $content; ?>
Whats the difference between the two codex? I like the first code format better its easier to format because I can just use html to change font etc. i.e. <h2><?php the_title(); ?></h2>
My page https://chesapeakecontrols.com/CCI2014/template2.php
Also any idea how to grab jobs manager in this formatting and embed with codex? I’m using the widgets on page plugin to get the plugins in the page so I can embed them.
I want this whole page https://chesapeakecontrols.com/wp/?page_id=40 embed but since its content is controlled by a plugin is just show the default page text. (Hi! This page is used by your Job Manager plugin as a base. Feel free to change settings here, but please do not delete this page. Also note that any content you enter here will not show up when this page is displayed on your site.)
- The topic ‘Help with codex’ is closed to new replies.