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
https://forums.phpfreaks.com/topic/290877-php-slider-pagnation-post-title-link/
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.

 

 

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>';

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.