• Resolved multitable2010

    (@multitable2010)


    Hello there! I could really use some guidence here. I need to edit the links in the “Recent Posts” as they are all linking back to the first blog that we ever created. I am not sure what source i should edit to link accordingly.

    Few things you should know:
    1) Customized Theme
    2) https://www.heightadjustableworktable.com/blog/

    Any assistance would be most helpful. I’ve been looking for this source all day!

Viewing 15 replies - 1 through 15 (of 17 total)
  • are you using widgets in the sidebar or is that hardcoded?

    if hardcoded, what is the code?
    please paste the full code of the sidebar template into a https://pastebin.com/ and post the link to it here.

    Thread Starter multitable2010

    (@multitable2010)

    We are using widgets. I am not sure if it is hardcoded or not. It must be because i had messed with other widgets from the Admin Panel, but they would not appear on the blog. (Assuming because of the customized theme). Can you tell me the directory where i would find such code? (assuming it is hardcoded.)

    ‘normally’ you would check for sidebar.php under:

    dashboard – appearance – editor – Sidebar (sidebar.php)

    however, as your theme is ‘hand-made’ it could be anywhere…

    Thread Starter multitable2010

    (@multitable2010)

    Here is the sidebar.php within the Theme folder

    Click Here

    change line 121 to:

    <td width="90%" align="left" valign="top" class="textmatterright"><a href="<?php echo get_permalink($row1['ID']); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), esc_attr($row1['post_title']) ); ?>" rel="bookmark" class="textmatterrightlink"><?php echo $row1['post_title']; ?></a></td>

    and the same in line 166

    Thread Starter multitable2010

    (@multitable2010)

    Thanks for the advise Alchymyth.

    When i change this code, now you cannot see the Names of the Recent Posts and nothing to click on. Would this change if a new blog is posted? (As in from here on out) Or should it have pulled up the recent posts already?

    the code again (tested in local test blog):

    <td width="90%" align="left" valign="top" class="textmatterright"><a href="<?php echo get_permalink($row1['ID']); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), esc_attr( $row1['post_title'] ) ); ?>" rel="bookmark" class="textmatterrightlink"><?php echo $row1['post_title']; ?></a></td>

    please paste the full code of sidebar.php after your edits again and post the link to the pastebin here.

    Thread Starter multitable2010

    (@multitable2010)

    Tried it again, same results. ??

    Click Here to view the edited code.

    my mistake, i was not very clear in my suggestion:
    ‘and the same in line 166’ meant to adjust the code in the same way – not to paste the same stuff;

    the query for line 166 is different, and therefore line 166 should look like:

    <td width="90%" align="left" valign="top" class="textmatterright"><a href="<?php echo get_permalink($row['ID']); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), esc_attr( $row['post_title'] ) ); ?>" rel="bookmark" class="textmatterrightlink"><?php echo $row['post_title']; ?></a></td>

    Thread Starter multitable2010

    (@multitable2010)

    Thank you, Thank you, Thank you! You saved us!

    It works like it should…. now…. i just need to get the “Tags” to link up correctly. Any idea where i should start with that?

    get the “Tags” to link up correctly.

    what tags?
    can you point to the area where the tags are?

    (the post tags below the posts are linking correct as far as I can see)

    Thread Starter multitable2010

    (@multitable2010)

    I apologize. It is listed in the same Sidebar, but under “Categories”. The kicker is, those aren’t Categories. They are the tags we use.

    *shakes head in confusion*

    So the “Categories” a.k.a Tags, don’t link up to another post.

    So the “Categories” a.k.a Tags, don’t link up to another post.

    they would link to a archive page – which some of these category links seem to do (check ‘Health News’ for instance).

    if you want Tags in that list, you need to re-code the section starting with line 199 –
    as I still haven’t totaly understood what you want to show in that list, I am unable to help;
    possibly try to contact the original programmer of your template to discuss that.

    Thread Starter multitable2010

    (@multitable2010)

    We prefer them to be an actual Category, since the tags are already on the blogs themselves.

    I wish we could locate the programmer. Unfortunately, that is why I am taking this project over.

    replace line 200:

    $sql="select * from wp_terms";

    with:

    $sql="select * from wp_term_taxonomy WHERE taxonomy = 'category' AND count > 0";

    and replace line 211:

    <td width="90%" align="left" valign="top" class="textmatterright"><a href="?cat=<?php echo $result['term_id']; ?>" class="textmatterrightlink"><?php echo $result['name']; ?></a></td>

    with:

    <td width="90%" align="left" valign="top" class="textmatterright"><a href="<?php echo get_category_link( $result['term_id'] ); ?>" class="textmatterrightlink"><?php echo get_category( $result['term_id'] )->name; ?></a></td>

    that should give you a list of category links

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Recent Posts are all linked to the First Blog..’ is closed to new replies.