WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove Page Title but not Post Title (22 posts)

  1. Andy Woggle
    Member
    Posted 1 year ago #

    Hello..WP Newbie here..I've made my site (although it's live it's on a subdomain until I've finished it) using the Shiword theme..

    I have a few static pages,and one page for Posts..I don't want the titles to show on Pages (I think it looks un-necessary) but I do want it to show on Posts.And I am really struggling to work out how this can be possible.Currently I'm using a plug-in (Hide Title) but that removes from both..

    My site is here at the moment- http://www.build.mr-woggle.co.uk

    I can post my page.php code if need be,but don't know where to?

    Thanks for your time

    Andy

  2. Andy Woggle
    Member
    Posted 1 year ago #

    Worked out how to post code!! Here is the code of my page.php file-

    <?php
    /**
     * page.php
     *
     * The single page template file, used to display single pages.
     *
     * @package Shiword
     * @since 1.00
     */
    
    get_header(); ?>
    
    <?php shiword_get_layout( 'page' ); ?>
    
    <div class="<?php shiword_content_class(); ?>">
    
    	<?php if ( have_posts() ) {
    
    		while ( have_posts() ) {
    
    			the_post(); ?>
    
    			<?php shiword_hook_entry_before(); ?>
    
    			<div <?php post_class( 'sw-entry-standard' ) ?> id="post-<?php the_ID(); ?>">
    
    				<?php shiword_hook_entry_top(); ?>
    
    				<?php shiword_post_title( array( 'featured' => 1 ) ); ?>
    
    				<?php shiword_hook_like_it(); ?>
    
    				<?php shiword_extrainfo( array( 'auth' => 0, 'date' => 0, 'tags' => 0, 'cats' => 0 ) ); ?>
    
    				<div class="storycontent">
    
    					<?php the_content(); ?>
    
    				</div>
    
    				<div class="fixfloat">
    
    					<?php wp_link_pages( 'before=<div class="meta sw-paginated-entry">' . __( 'Pages', 'shiword' ) . ':&after=</div>' ); ?>
    
    				</div>
    
    				<?php shiword_hook_entry_bottom(); ?>
    
    			</div>
    
    			<?php shiword_hook_entry_after(); ?>
    
    			<?php shiword_get_sidebar( 'single' ); // show single widget area ?>
    
    			<?php comments_template(); // Get wp-comments.php template ?>
    
    		<?php } ?>
    
    	<?php } else { ?>
    
    		<p><?php _e( 'Sorry, no posts matched your criteria.', 'shiword' );?></p>
    
    	<?php } ?>
    
    </div>
    
    <?php shiword_get_sidebar(); // show sidebar ?>
    
    <?php get_footer(); ?>
  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you installed a custom CSS plugin?

  4. Andy Woggle
    Member
    Posted 1 year ago #

    Not that I am aware of-Plug ins I'm using are -Contact Form/Captcha, Hide Title (which I can turn off if I can find a solution),Per Page sidebars, and a few media plugins

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    In that case, install a custom CSS plugin. Once that is running, use Firefox with the Firebug add-on (or use whatever developer tool is available in your web browser) to check the classes being generated on the opening <body> tag and the Page/Post heading tag. Using both, you should be able to hide the titles on just the Pages using pure CSS along the lines of:

    body.page .post-title {
    position:absolute;
    top:-9999px;
    left:-9999px;
    }

    assuming that .post-title is the class on the heading tag.

  6. Andy Woggle
    Member
    Posted 1 year ago #

    Nothing happened :( Can you suggest a CSS editor?The one I just tried didn't seem to affect anything (WP LIVE CSS)

    Would there be a plug-in that could edit the css of each post?I guess this is probably just a run-around and not advisable,but I'm really struggling on this bit..

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    Could we have a look at a Page on your site first?

  8. Andy Woggle
    Member
    Posted 1 year ago #

    which page do you need to see (sorry,I am really new to WP although getting there)

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    Any static Page that you want to hide the page title on.

  10. Andy Woggle
    Member
    Posted 1 year ago #

    I *hope* this is what you mean..Please forgive my noobiness if it isn't..
    The Audio Page code

    &nbsp;
    <p style="text-align: justify;">I come from a musical family- nearly all of us have some kind of musical quirk in our clan- so it was inevitable that I'd end up doing something musical at some point in time.. I was trained   to play the piano as a child, which never really got very far,and come the age of 15 thought I'd put my hand at playing the guitar... Again it never really got very far, into a couple of not especially good bands, one funny one that shall remain nameless which got us some comedy gigs... And then it all stopped for a while, barring a dabbling at making bad dance music on an even worse computer in the late 90s..</p>
    <p style="text-align: justify;">And then I saw Two Many DJs...</p>
    <p style="text-align: justify;">They blew me away.. But after playing "<a title="THAT 2 Many DJs CD...." href="http://www.discogs.com/2-Many-DJs-As-Heard-On-Radio-Soulwax-Pt-2/release/49619" target="_blank">THAT</a>" CD of theirs to absolute death, I had a game-changing thought.. "Hang on, I've got a good musical ear.. I can use computers.. I've got a sense of humour.... I CAN DO THAT"</p>
    <p style="text-align: justify;">So I booted up a copy of Soundforge, a copy of Acid and a rake of plug-ins.. And the next thing I'm aware of is having a legit copy of Traktor Pro in my arsenal too, and was playing my heinous mix of music to anyone and their dog that would listen...</p>
    <p style="text-align: justify;">Places I have played at include-</p>
    
    <ul style="text-align: justify;">
    	<li><span class="Apple-style-span" style="line-height: 12px;">Strawberry Fair,Cambridge</span></li>
    	<li>Shambala Festival</li>
    	<li>Beautiful Days Festival,Devon</li>
    	<li>Alchemy Festival</li>
    	<li>Friekfest, Amsterdam</li>
    	<li>Not forgetting of course, several hilariously good times had at <a title="Bristol Roller Derby" href="http://www.bristolrollerderby.com/" target="_blank">Bristol Roller Derby</a> afterbout parties too, amongst many others.</li>
    </ul>
    <p style="text-align: justify;">If you want me to play your event/festival/party, drop me a line from the Contact section and we shall work something out...</p>
  11. Andy Woggle
    Member
    Posted 1 year ago #

    I've migrated it since starting this by the way.It's only this issue I have to fix,it's now found at http://www.mr-woggle.co.uk

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    No - we actually need to see the page on your site - not it's code or its content. The actual page. Just post an example url here.

  13. Andy Woggle
    Member
    Posted 1 year ago #

    Ah.I see..Apologies...

    Here is a page with no title http://www.mr-woggle.co.uk/?page_id=27

    But I used hide title plug in,which also removes it from the Blog page where I post

    http://www.mr-woggle.co.uk/?page_id=33

    Is this better?

    Thanks for helping btw

  14. Andy Woggle
    Member
    Posted 1 year ago #

    Quick update-I discovered a blog explaining how to disable titles in individual pages-which is what I wanted originally-but because they are hidden with use of a plugin,that wouldn't work.I disabled the plug,and still had the same problem.I have unistalled the plug,but there is still no titles across the site (Page or Post)

    Is it possible I have removed the CSS with this plug to show any title at all?If so,what would I replace it with?I still want the title in the post page after all..

    Thanks again

  15. esmi
    Forum Moderator
    Posted 1 year ago #

    Can we see a page WITH a title, please? Disable that plugin you are using.

  16. Andy Woggle
    Member
    Posted 1 year ago #

    I have already!! I've uninstalled the plugin I used to hide the titles,but they are still missing..For example,this page http://www.mr-woggle.co.uk/?page_id=27 is called Audio Geek..The plugin that hid the title is no more,but it's still not showing!

    Aghhh...I only want the title in the posts,but I'm going around in circles!!

  17. Andy Woggle
    Member
    Posted 1 year ago #

    If this explains anymore,here is the Blog post http://www.mr-woggle.co.uk/?page_id=33 which obviously doesn't work without titles,it looks messy..

    I cannot work out whats happened :(

  18. Andy Woggle
    Member
    Posted 1 year ago #

    Sorted it.I changed theme,uninstalled the theme I was using,re-installed it and activated it..I now need to remove titles from the pages not the blog,but I *think* I've worked out how to do that

    Thanks all

  19. Andy Woggle
    Member
    Posted 1 year ago #

    I've sorted the lacking of title on the Post page,which was really my main concern, and why I selected resolved.

    I haven't resolved the titles on pages yet,but will read the link you sent me about custom css and try again

    Thanks all

  20. tbcrew
    Member
    Posted 1 year ago #

    Hi there,

    try one of the following

    * add the css code to "custom CSS" option field in "theme options" page

    body.page .storytitle {
    position:absolute;
    top:-9999px;
    left:-9999px;
    }

    * or delete the line 30 in page.php

    <?php shiword_post_title( array( 'featured' => 1 ) ); ?>
  21. designwallah
    Member
    Posted 7 months ago #

    This is how I hid the Page titles, but showed the Post titles:

    .page #page-caption { display: none; } /* Do not display the Page title div */
    .blog #page-caption { display: none; } /* Do not display the Page title div for the Posts main page */

    .page for Pages, .blog for the Posts main page.

  22. iamher
    Member
    Posted 4 months ago #

    Can you also use that code on a static front page? I'd like to hide the front page title, but keep the titles under my "featured content" grid. Is that possible?

Topic Closed

This topic has been closed to new replies.

About this Topic