Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter mxalpinestar

    (@mxalpinestar)

    Oo i found it out! a way that works. So on my page i added this php function:

    <?php
    function new_excerpt_length($length) {
            return 12;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    ?>

    So then in my body where i wanted it to display the post i just keep it:

    <?php while (have_posts()): the_post(); ?>
    <center><h3><?php the_title(); ?></h3></center>
    <?php the_excerpt(); ?>
    <?php endwhile; ?>

    And now it only displays the first 12 words of the post and displays: …Read More –> with a working link.

    Thread Starter mxalpinestar

    (@mxalpinestar)

    lgkevincc, knows what im talking about and he had the right info that i need, i just need to know where to place the <!–more–> and if i replace the <?php the_excerpt(); ?> to <?php the_content(); ?> how much of the post will it display?

    Thread Starter mxalpinestar

    (@mxalpinestar)

    no i think you need to reread my first post on here. I have done that already and it works just fine. Thats not what im trying to get at now. Im trying to find a way to no display the full post on the homepage. as of right now the coding they tell you to input on the homepage to display the posts it displays the full post and then links read more. But there is no point in having that if it shows the full post already. I want it to only display the first sentence and then the read more part would be useful.

    Thread Starter mxalpinestar

    (@mxalpinestar)

    Nope the php is what im putting on my page to display the posts. i didnt add any coding to the wordpress post that i created. So your saying i have to add php code in the post on wordpress in order for the teaser i am displaying on the homepage to show only part of the post?

    Thread Starter mxalpinestar

    (@mxalpinestar)

    And how would i know where to stop for the sentence? since im posting this only on the page outside of the word press blog? its on a seperate page. or would i just make the code this:

    <?php while (have_posts()): the_post(); ?>
     <center><h3><?php the_title(); ?></h3></center>
     <?php the_content(); ?>
    <a href="<?php the_permalink(); ?>" target="_new"><!--more-->Read more..</a>
    <?php endwhile; ?>

    would that work?
    the page i have this code on is : https://www.jessicadurrant.com/blog.php

    and my wordpress blog is at: https://www.jessicadurrant.com/wordpress/

    You need to be more specific. So you have a wordpress website and then you want to add a blog to your wordpress website? and have you made a blog yet? You can make a blog with wordpress then be able to link it to your blog in the navigation.

    Forum: Fixing WordPress
    In reply to: WP blog in website
    Thread Starter mxalpinestar

    (@mxalpinestar)

    Does anyone know a tutorial or the coding to add the ability to add a comment to the blog posts on the Integrated wordpress with in my website? so that people can also comment on the posts that are displayed on my webpage that i put the php coding on?

    Forum: Fixing WordPress
    In reply to: WP blog in website
    Thread Starter mxalpinestar

    (@mxalpinestar)

    Thanks for clearing that up for me. But i dont see how you got that im whining. the tutorial i was looking at made we use a different code line and it was not giving me what i was trying to get, and that was what i was stating.

    Forum: Fixing WordPress
    In reply to: WP blog in website
    Thread Starter mxalpinestar

    (@mxalpinestar)

    Ya i agree with you. but let me know how it works out for you.

    Forum: Fixing WordPress
    In reply to: WP blog in website
    Thread Starter mxalpinestar

    (@mxalpinestar)

    Ok so i went to that link and i inputted the coding into a page on my website. it worked but they have the php call the wordpress blogheader.php and a few other things so when i view my page it looks like the rest of my website but the header at the top of the page and background is all the same as the full wordpress blog. it also has the banner and menu bar thats on the wordpress blog. i want it to just have the posts on my page but keep my website look and the menu etc. is there away around adding the php code:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('./wordpress/wp-blog-header.php');
    ?>
    
    <?php define('WP_USE_THEMES', false); get_header(); ?>

    that is on my blog.php page. and it says false but it still shows up on the page and when i try to not include this the page has errors and will not show the posts.

    Forum: Fixing WordPress
    In reply to: WP blog in website
    Thread Starter mxalpinestar

    (@mxalpinestar)

    Ok so with that i still have to have the wordpress blog to make the posts and comments? and when i use the coding that they give me and put it on a page on my website it will show a couple of the blog posts right? i just have to go to wordpress blog to make new posts and then the coding i used will show the new posts and etc on the page i added it to? correct?

Viewing 11 replies - 1 through 11 (of 11 total)