Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How Do I Center Date,author,edt In Wordpress?


15 replies to this topic

#1 anwiii

    I wont bite...unless you WANT me too

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,704 posts
  • Gender:Male
  • Location:Chilhowee, MO
  • Interests:watching grass grow....
  • myCENT:62.06
  • Spam Patrol

Posted 21 November 2010 - 09:47 PM

i am having trouble centering the date, the author, and the edit link in word press. you know the line that is right below the title of the post?

i believe i need to edit the page.php file in this section here....

<?php endif; ?>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="" />
<?php the_time(__('F jS, Y', 'kubrick')) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="18" height="18" alt="" />
<?php _e('Author', 'kubrick'); ?>: <?php the_author_posts_link() ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="14" height="14" alt="" />
<?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>

i've been trying to mess around with it but nothing seems to be working. should i be concentrating on the css file? any help would be great!

#2 Eza

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 121 posts
  • Gender:Not Telling
  • Interests:General Guru
  • myCENT:10.74

Posted 21 November 2010 - 10:54 PM

Leave it and concentrate on the rest of the content.
This is not important.

#3 anwiii

    I wont bite...unless you WANT me too

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,704 posts
  • Gender:Male
  • Location:Chilhowee, MO
  • Interests:watching grass grow....
  • myCENT:62.06
  • Spam Patrol

Posted 22 November 2010 - 03:16 AM

oh hush. if it wasn't important, i wouldn't have posted it in the first place. if you have nothing important to say, please don't spam my thread with your irrelevant babble

#4 k_nitin_r

    Grand Imperial Poobah

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,114 posts
  • Gender:Male
  • Location:Dubai
  • myCENT:50.55

Posted 22 November 2010 - 07:21 AM

Hi!

Most themes are built by graphic designers who intended it to have a particular look, so if you were to tinker with it, the designer would be really mad, along the lines of a french cook seeing you add ketchup into the mix! :-P

But, then again, there are some really terrible so-called designers and it would be a mortal sin to have to use their designs without some modifications, and so here you are - modifying somebody's WordPress template to suit your tastes.

The quickest way to center the text is to put a BR tag and an opening CENTER tag just after the "$icons = array" line, and then put a closing CENTER tag followed by a BR tag before the "$icons[] = ob_get_clean();" line.

The approach above uses plain old HTML tags but you can also do it through CSS by modifying a file named style.css (or by using in-line CSS attributes and internal CSS style sheets, but if you want to do it the cleaner way you might as well put in the effort to do it in a completely clean manner). Every theme has one of those because a WordPress theme stores all of its metainformation within the stylesheet, unlike other content management systems and blogging engines that maintain a separate XML file. I guess it's just a convenience that WordPress provides.

@Eza: Every speaker from Google always repeats the same line over and over again - "Content is KING!!!!" Apparently, it's a catch phrase that is popular among internal circles at Google and they want to project it to the world so every speaker is trained to tell folks that line, I don't really know, but every Google speaker I have heard who speaks about search engine optimization has said that line at least once during their presentations. Google's search bots pick up whatever they can from the content on your page and will appropriately direct traffic to your web page even if you have not structured it right, have a poor layout, and have a really broken HTML markup (or XHTML markup, as the case may be, but HTML is more permissive and does not require unclosed HTML tags to have that slash at the end). On the flip side, if you have got some really fancy HTML and CSS with no validation errors, but you haven't got the content, there's no chance in a million that Google is going to send you any traffic at all.... although that is questionable, seeing how so many domain-parked pages are setup out there with the sole purpose of getting visitors to the page through search engines. There is another point that every webmaster does tell you - your content should target humans and not search engines. Search engines help you get people to your website when they need to find something, but it is the regular readers that you want to keep loyal to your website and those are the folks that you should focus on. They would visit your site for updated content, so make sure you do have plenty of content coming in ever so often, just as we do on the KnowledgeSutra forums - there is always a new topic coming up, and if there isn't, there are always replies to existing topics to read. If there are neither of those, there are still the MyCENT posting credits that draw the forum users to the website... which may not be the same as providing content, but is a different kind of an incentive.

@anwii: What's the site that you are putting together? Can we get a peek at it?

#5 Eza

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 121 posts
  • Gender:Not Telling
  • Interests:General Guru
  • myCENT:10.74

Posted 22 November 2010 - 11:28 AM

Internet consists for a big part of links. And there are no reports known whatsoever that it is forbidden to post a link to a website on another website. Let aside alone on a forum. So to have some objection against the posting of a link is in some way strange. Other possibilities are to not make a website at all, to not post about the website on a forum, to avoid to post the name of the website in the profile of the owner of the website to start with and some other possibilities, like hiding the website behind a password. Another possibility is to not publish the website on the internet if it might harm the project if the link is published. The project might be not very strong when 1 single link might influence the result of the project. The name of the website was mentioned in another topic. This name was spread with dots. And the comment was added that this was done to provide the google search engine from finding the website. It just happened that Google found the link by itself. Maybe because the name of the website was put in the profile of the owner of the website. Maybe because Google finds websites that are on the internet. A warning and a request to everybody not to post the name of the website would have made readers of the topic aware that posting the link to the website could influence the process of the project. Since such a warning and such a request are not posted along with the name of the website there seems to be no reason to get upset of seeing the link to the website.

Edited by Eza, 30 November 2010 - 02:02 PM.


#6 anwiii

    I wont bite...unless you WANT me too

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,704 posts
  • Gender:Male
  • Location:Chilhowee, MO
  • Interests:watching grass grow....
  • myCENT:62.06
  • Spam Patrol

Posted 22 November 2010 - 03:01 PM

eza, you have absolutely NO BUSINESS posting one of my domains in public. and for your information, that isn't the domain name you fool. if you notice, there is no date,author,edit link on that site to center.

i am reporting every single post you make that is spam and/or irrelevant from now on.

any mod- please verify that this person isn't an older member who was warned several times in the past and has had their posting privileges suspended in the past.

for anyone reading this, i apologize.


@ k_nitin_r - i tried using regular center tags already among other things. the center tags don't work. i tried googling an answer as well. i didn't search too deep, but all i found was how to remove those things. i wish my problem was as simple as that :)

Edited by anwiii, 22 November 2010 - 03:26 PM.


#7 Eza

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 121 posts
  • Gender:Not Telling
  • Interests:General Guru
  • myCENT:10.74

Posted 22 November 2010 - 04:55 PM

View Postanwiii, on 22 November 2010 - 03:01 PM, said:

eza, you have absolutely NO BUSINESS posting one of my domains in public.
(some part edited out)

If somebody likes it if a link gets removed the solution is to ask politely to remove the link. That is how simple life is. And that link was in the profile of the topic starter. It will be funny if the website is not the site of the subject of this topic.

Edited by Eza, 22 November 2010 - 04:56 PM.


#8 mahesh2k

    Trap Double Mocha Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Valley of Darkness
  • myCENT:27.17
  • Spam Patrol

Posted 22 November 2010 - 05:30 PM

Quote

Float:center;

this code can be used for the tags which are in CSS of kubrick. I don't know if these tags are having any CSS attention in .css file. If not you have to make author meta like this by making the float property at the center. Note it is also possible to float at right and then making it look like center by setting a margin for it. That will also work in case of author meta tags. But i'm not sure about this theme as i never did any editing with this theme. Let me know if it works.

#9 Iniyila

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 414 posts
  • Gender:Male
  • myCENT:98.30

Posted 22 November 2010 - 06:59 PM

i think you need to change the content of css too, but if you want to change css float i suggest to not to use float:center because i have used it and there is no effect at all.

i serached google and i found that float:center seems to not work proparley for css (or some of them) and i used width and margin-left , margin-right to center the text like this :

float:left
width:50%
margin-left:auto
margin-right:auto

and the result is just nice & the text is perfectly centered.

#10 mahesh2k

    Trap Double Mocha Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,347 posts
  • Gender:Male
  • Location:Valley of Darkness
  • myCENT:27.17
  • Spam Patrol

Posted 23 November 2010 - 08:13 AM

Changing value to float:right will also get the same result in this case. And yes as iniliya posted code for float left will work as well. You need to just adjust the value of margin to left and right. Kubrick being single column theme it's better to set it either right or left depending on how you want it to display with content.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users