WordPress.org

Forums

[Plugin: Page Lists Plus] Looking to disable the page link in a parent page (5 posts)

  1. RickA99
    Member
    Posted 6 years ago #

    This plugin appears to have a great concept and I look forward to further revisions but I'm not sure that it does what I am need. I am trying to have a selected parent page in the menu not link to its page so that the user has to select one of the child pages in the drop down menu.

    I say that because I was unsucessful in the two tests that I ran.

    1) WP 2.7.1 with Thesis theme and the Multilevel Navigation Plugin - broke the dropdown for the parent page where I removed the link.

    2) WP 2.7.1 with iNove theme - it broke the built-in drop down menu structure.

  2. Technokinetics
    Member
    Posted 6 years ago #

    Hi Rick,

    I just found this thread. (For future reference, support requests submitted using the email link on the Settings > Page Lists Plus page in the dashboard tend to get my attention more quickly.)

    If you use Page Lists Plus to unlink an item in your Page lists then it will replace a list item containing a link with a list item containing bare text. If your Page list styling works by styling links contained in list items, then this will cause a problem: your unlinked list item won't be styled to match your links.

    The solution to this is to modify your theme's stylesheet so that your Page list styling works by styling list items rather than links. I appreciate that that will be easier to do for some themes than for others.

    Further revisions of PLP are unlikely to solve this problem, because it isn't a PLP issue so much as a theme issue: PLP is already outputting the correct HTML, but theme authors who haven't anticipated users unlinking items in Page lists haven't styled Page lists with this possibility in mind. (That said, I do have one idea for how this might be made to work...)

    Thankfully most of the other features of PLP change the HTML in less dramatic ways than this, so don't give rise to this kind of issue.

    - Tim

  3. JasonHo
    Member
    Posted 5 years ago #

    post deleted

  4. JasonHo
    Member
    Posted 5 years ago #

    Hi Rick

    While I totally agree with Tim in that the issue lies with the theme styles, I too was in the same boat as you in wanting to use this plugin with the iNove theme. I started looking through the code, and made one minor change in order to get it working with iNove.

    This is somewhat ugly but it appears to work with iNove for me:

    search for the code block below in the plugin file (note the block here has the <a> tags added to show you where).

    $link_link_data = mysql_query("SELECT post_title FROM " . $posts_table . " WHERE link_link = '0' AND post_status = 'publish'");
    	while ($row = mysql_fetch_assoc($link_link_data)) {
    		extract($row);
    		$post_title = wptexturize($post_title);
    		$output = preg_replace('<a(.+)' . $post_title . '(.+)+/a>', '<a>'.$post_title.'</a>', $output);
    	}

    I merely added empty anchor tags as part of the replacement for the link_link option.

    Essentially the original line
    $output = preg_replace('<a(.+)' . $post_title . '(.+)+/a>', $post_title, $output);
    is replaced with
    $output = preg_replace('<a(.+)' . $post_title . '(.+)+/a>', '<a>'.$post_title.'</a>', $output);

    This approach to me was much easier than fiddling around with the css style sheet.

    edit: 5th time lucky trying to format the code snippet correctly! sorry I'm being a wp forum noob. Apologies for the previous deleted post, I thought I had a bug with the update but then it seems to be working again now.

    </Jason>

  5. jonmao
    Member
    Posted 5 years ago #

    Hi

    I'm trying to do the same thing - unlink a parent nav menu item so that only it's children are linked.

    Is Page Lists Plus the only way to achieve what Rick is trying to do?

    Any suggestions would be really appreciated - I'm not a PHP programmer but I can copy/paste and customise :-D

    Cheers
    Jonno

Topic Closed

This topic has been closed to new replies.

About this Topic