WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page template and menu (4 posts)

  1. Asus24
    Member
    Posted 1 year ago #

    I build a custom menu that has images as tabs, and I have custom Page templates. I need a way to call the page template directly from the menu.
    I don't want to create a link to a page using the template because I dont want the person to accidently delete the page using the page template and have their website down.

    I am basically trying to do this li class=\"bk0\">slidingdoor</li

    $mytemplate = get_page_template('mypage_template.php');

    any help would be most appreciated

  2. Tarsem Singh
    Member
    Posted 1 year ago #

  3. Asus24
    Member
    Posted 1 year ago #

    I was actually looking at this but I dont actually know where to find the slug for the page template. Still would like more help on this issue please

  4. Asus24
    Member
    Posted 1 year ago #

    Below shows what I am trying to do. When I click on the corresponding link nothing shows up

    function no_sliding_menu(){
     $blog_url = site_url();
     $p_url= get_template_part( 'loop', 'index' );
     $theme_url=get_bloginfo('template_url');
    echo "<ul>
                         <li class=\"bk0\"><a href=\"".$blog_url."\" style=\"background: url('http://www.ccbl.info.tt/carib/wp-content/uploads/2012/09/tabs-01.png') no-repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk1\"><a href=\"#\" style=\"background: url('http://www.ccbl.info.tt/carib/wp-content/uploads/2012/09/tabs-02.png') no-repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk2\"><a href=\"".$p_url."\" style=\"background: url('http://www.ccbl.info.tt/carib/wp-content/uploads/2012/09/tabs-03.png') no-repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk3\"><a href=\"http://mac-host.com/slidingdoor/slider.zip\" style=\"background: url('http://www.ccbl.info.tt/carib/wp-content/uploads/2012/09/tabs-04.png') no-repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk4\"><a href=\"http://mac-host.com/support\" style=\"background: url('http://www.ccbl.info.tt/carib/wp-content/uploads/2012/09/tabs-05.png') no-repeat scroll 0%;\">slidingdoor</a></li>
    
    				</ul>";
    }

Topic Closed

This topic has been closed to new replies.

About this Topic