January 21, 201412 yr Hi Everyone, It's been ages since i've touched on PHP/Wordpress, so the following may seem silly - bear with me. I have a WP site. My client wishes to add some additional text on just one of his pages (see page2 attachment). I have already set up a template for the inner pages of the site, so please could you look at the attached mock ups and let me know the most efficient way of adding the 'additional text', on just one specific page. Would I have to create another page template or...? Thanks in advance
January 21, 201412 yr Im not 100% sure on how WP works but could you not just add a if else statement under the page title checking what page you are on and if its the correct page show the text, seams a little OTT to make a whole new page for one additional element
January 22, 201412 yr D4Y0 is right. Wordpress does tell you which page you are on whether that be URL or template. is_page may help you with the solution http://codex.wordpress.org/Function_Reference/is_page
January 24, 201412 yr There are several ways you can do this: A conditional is_page() function (see above) template hierarchy create a page named page-(slug).php a custom template named yourcustomname.php which is chosen from the drop-down menu on the editor page. If it's just one line the first option would be best and if your client might want to change it back someday the last one would save you some work. More about page templates
Create an account or sign in to comment