Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wordpress links

Featured Replies

Hi all,

 

This page has a list of links but when I click 'edit page' the links are not there - can anyone please tell me what is causing the links to display and also how do I move my text 'here is some text...' from the bottom of the page to the top (ie above the links)?

 

Thank you :)

It's either hard coded into the template, gathered from the Blogroll or they are being grabbed from another page

 

If you can set up a new admin account, and pm me the login details & url, I will take a look for you.

  • Author

It's either hard coded into the template...

Hi, thanks for your help :)

 

I think you are right - here is a copy of page.php

 

I will pm login anyway...

 

thanks :)

  • Author

In fact, i'm 100% sure it's list pages function.

OK thanks - I guess it is 'php wp_list_pages' in my page.php?

 

If so is it possible for me to edit this page to write stuff above the list of pages?

 

Thanks

It is definately the sub menu of the works <li> in the top menu. How it got there I don't know, but as Mike pointed out it looks like list pages function.

  • Author

OK thanks - I guess it is 'php wp_list_pages' in my page.php?

 

If so is it possible for me to edit this page to write stuff above the list of pages?

 

Thanks

I guess one way would be for me to delete 'php wp_list_pages' from page.php and then add the list of pages manually but is there a better way?

 

Thanks

It's a bit more complicated because you have a bunch of conditionals set up but in general move the line...

 

<ul class="works_list"><?php wp_list_pages('child_of=19&link_before=<h3>&link_after=</h3>&title_li='); ?></ul>

 

wherever you want it to display in the loop.

 

Take note of the conditionals that are in place as you may need to move them as well.

 

The entire 'if' section...

 

<?php if ( is_front_page() ) { ?>
					<h2 class="entry-title"><?php the_title(); ?></h2>
				<?php } else if (is_page('works')) { ?>
                   	<!--<h1 class="category-title"><?php the_title(); ?></h1>-->
                       <p> </p>
                       <ul class="works_list"><?php wp_list_pages('child_of=19&link_before=<h3>&link_after=</h3>&title_li='); ?></ul>
                       <p> </p>
                       <p> </p>
                       <!--<hr/>-->
                       <?php 
						/*$pages = get_pages('child_of=19&sort_column=menu_order'); 
						foreach ($pages as $pagg) {
							//echo get_page_link($pagg->ID);
							echo "<h2>".$pagg->post_title."</h2>";
							echo $pagg->post_content;
						}*/
				?>
                   <?php } else { ?>
                   <?php if (is_subpage()) { ?>
                   <div class="navigation">
                   <div class="nav-back"><a href="<?php echo get_permalink($post->post_parent); ?>"><span class="meta-nav">← Back to list of works</span></a></div>
                   <?php if(is_page('401')) {
				} else { ?>
				<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', '%title', 'twentyten' ) . '</span> %title' ); ?></div>
                   <?php } ?>

 

is what is setting up the content but the actual text is being pulled after the 'if' section using...

 

<?php } ?>
					<h1 class="entry-title"><?php the_title(); ?></h1>
				<?php } ?>

				<div class="entry-content">
					<?php the_content(); ?>
				</div><!-- .entry-content -->

  • Author

It's a bit more complicated because you have a bunch of conditionals set up but in general move the line...

 

<ul class="works_list"><?php wp_list_pages('child_of=19&link_before=<h3>&link_after=</h3>&title_li='); ?></ul>

 

wherever you want it to display in the loop.

OK thanks but I am not sure where to move the line to get the desired effect of being able to add text above the list of links from the Wordpress interface.

 

I can see that some of the later code in page.php concerns not the works page but its child pages (eg 'Back to list of works' etc). But I only want to change the 'works page' and not other pages. Could I just delete the line

 

<ul class="works_list"><?php wp_list_pages('child_of=19&link_before=<h3>&link_after=</h3>&title_li='); ?></ul>

 

?

 

Thanks

Edited by Juc1

  • Author

Could I just delete the line

 

<ul class="works_list"><?php wp_list_pages('child_of=19&link_before=<h3>&link_after=</h3>&title_li='); ?></ul>

 

So I deleted this line - so far it seems ok with no unwanted side effects...

  • Author

So I deleted this line - so far it seems ok with no unwanted side effects...

Actually one minor side effect - it seems that the title of the page ('Works') is not printing - any suggestions please?

 

Thanks :)

Edited by Juc1

  • Author

Actually one minor side effect - it seems that the title of the page ('Works') is not printing - any suggestions please?

 

Thanks :)

 

 

update - ok fixed...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.