Featured Widget Amplified help

Community Forums Forums General Discussion Featured Widget Amplified help

This topic is: not resolved

This topic contains 37 replies, has 2 voices, and was last updated by  nickthegeek 1 year, 10 months ago.

Viewing 15 posts - 1 through 15 (of 38 total)
  • Author
    Posts
  • #945

    Jeffrey
    Participant

    Is there a way to put “Leave a comment” and “read more” in the same section of the widget. The default “read more” area is in the post title section and the default “comments” location is the post meta. Is there a way to merge them — or maybe to call the “read more” link to the post meta section?

    Thanks so much!

    #1024

    nickthegeek
    Keymaster
    Post count: 751

    Jeff, There really isn’t a simple way to do that. The issue is that the read more is part of the content output, so you would need to make your own custom content and a custom short code to output the more link in the post meta section.

    #1030

    Jeffrey
    Participant

    Thanks for the reply Nick.

    Well, is there an easier way to display the “comments” link in the content section with the “read more”, instead of the aforementioned vice versa?

    #1112

    nickthegeek
    Keymaster
    Post count: 751

    Not really, both require replacing the plugin content output with your own custom output.

    #1188

    Jeffrey
    Participant

    gotcha nick. is there anyway you could help me with that custom output? is it a big ordeal?

    #1373

    nickthegeek
    Keymaster
    Post count: 751

    Jeffery,

    I don’t have the code for that written up.

    #1781

    Jeffrey
    Participant

    Nick, thanks for getting back to me over the holiday weekend. Is that easy code to write up? If not, do you know of a widget or plugin that already has this built in (though i need to maintain the post offset functionality).

    #1798

    nickthegeek
    Keymaster
    Post count: 751

    Jeffery,

    It isn’t super hard, it can be done via the hooks system built into the plugin. I’m not aware of one that does this already.

    #1808

    Jeffrey
    Participant

    Do you have any help on how to use the hooks system to accomplish this?

    Thanks a ton for your help Nick! If I can pull this off the site will be done! Yay!

     

    #2144

    Jeffrey
    Participant

    Any word Nick?

    #2148

    nickthegeek
    Keymaster
    Post count: 751

    I do not have any detailed tutorial. The information on hooks in my Genesis Explained series will apply here as well.

    http://designsbynickthegeek.com/tag/genesis-explained

    #2196

    Jeffrey
    Participant

    I’m really trying hard to wrap this up. Just don’t have much experience writing in short codes or hooks. Would something like this work – http://www.billerickson.net/code/add-read-more-to-display-posts-shortcode/ ? If so, can you post any modifications you see that I would need to make to that coded to be able to use a [read_more] short code in the widget post meta section?

    #2198

    Jeffrey
    Participant

    I tried this code in functions.php but I’m getting a parse error. Any ideas?

    function read_more() {
    if (have_posts()) :
    while (have_posts()) : the_post();
    $return_string = ‘<a href=’.get_permalink($post->ID).’>’.get_the_title().’</a>’;
    endwhile;
    endif;
    return $return_string;
    }

    function register_shortcodes() {
    add_shortcode( ‘read-more’, ‘read_more_function’);
    }

    #2454

    nickthegeek
    Keymaster
    Post count: 751

    I see directional quotes, I don’t know if that is formatting from the forum or the coded you added.


    function read_more() {
    global $post;
    $return_string = 'ID).'">'.get_the_title().'';
    return $return_string;
    }
    add_shortcode( 'read-more', 'read_more_function');

    #2662

    Jeffrey
    Participant

    copied ur code exactly and pasted it like this Nick:

    /** Add read more shortcode */
    function read_more() {
    global $post;
    $return_string = 'ID).'">'.get_the_title().'';
    return $return_string;
    }
    add_shortcode( 'read-more', 'read_more_function');

    I get the following error:

    Parse error: syntax error, unexpected '=' in /home/content/J/S/D/JSDavis82/html/wood/wp-content/themes/magazine/functions.php on line 97

    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
    • This reply was modified 1 year, 10 months ago by  Jeffrey.
Viewing 15 posts - 1 through 15 (of 38 total)

You must be logged in to reply to this topic.