Jump to content

PHP slider pagnation post title link


ksweat234

Recommended Posts

Hey guys I am trying to link my post tilte for pagnation to the actual post. This is wordpress blog-page.php

 

MY SITE IS GSUEAGLENATION.COM on the homepage any of the sliders you can tell that the pagnantion titles don't link anywhere

 

 

 $slider_pagination[] = get_the_title(); ------- I have tried messing around with this code and it just messesup my site

 

 

 

     snippet  EXAMPLE BELOW OF WHERE MY CODE IS  PULLING
                                
    <div class="pager-desc">
 <span class="cs-desc">     

'.$slider_title.'    ---------------------------this is where my titles are showing up on my site but Its only pulling the title I want to like the title to the post

</span>

                        </div>
                                    </li>';
                            }
                        echo '</ul></div>';
                }
            px_enqueue_cycle_script();
        endif;
        wp_reset_postdata();

 

 

 

 

 

\

 

page_blog.php

Link to comment
Share on other sites

Thanks. When I add your code in replace of it. the pagnation link works but the rest of the front page gets cut off and the pagnation freezes.

 

When ever I try to add a link to the title in that pagnation the site cuts off and freezes.

 

 

Edited by ksweat234
Link to comment
Share on other sites

It might help if you post the updated code. When posting the code, please surround it with


tags. It makes your post and code easier to follow. :happy-04:  

 

Also note that echo shouldn't be used after an assignment operator. This:

$slider_pagination = echo '<a href="' . get_permalink($post->ID) . '">' .get_the_title() . '</a>';
 
Should be this:
$slider_pagination[] = '<a href="' . get_permalink($post->ID) . '">' .get_the_title() . '</a>';

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.