Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   category multi-post pages link to same name page (http://forum.bytesforall.com/showthread.php?t=20646)

fullmetalgirl Jul 16, 2013 02:51 AM

category multi-post pages link to same name page
 
hi,

I'm trying to find a way to use %categories-linked('delimiter')% with it going to a normale page instead of the category page.

how can i make sure that
example:

website/category/categoryname (category multi-post page)
links to
website/categoryname (normal html page without a listing of posts)

juggledad Jul 16, 2013 03:06 AM

You can't without editing the theme code and changing what that option does.

Categories can be assigned to more than one post

fullmetalgirl Jul 16, 2013 03:19 AM

i was afraid of that, you cant help me with that? like what do i need to change and how?
it would be a nice new feater to athualpa if it was added...

juggledad Jul 16, 2013 03:44 AM

it does what it is suppose to do. Remember each category can have multiple posts associated with it. For example if you have the category 'fruit' you might have a post about apples and another about oranges and another about grapes so looking from the category you would have
HTML Code:

fruit
 *
 ** apple
 *
 ** orange
 *
 ** grapes

and lets assume you have a catefory of 'red' and you assign that category to 'apple' and 'grapes', then apples and grapes are associated with multiple categories.

the %categories-linked('delimiter')% (note the plural) shows the list of categories and when you click a category name it always takes you to a mullti post page showing all the posts in that category, even if there is just one post currently in the category.


my question is: What are you trying to do and why?

fullmetalgirl Jul 16, 2013 04:47 AM

I have a page, that contains 2 category lists of 2 diffrent categorys.
on that page are also some other specific for that page html items.

example:
Page "apples and grapes"

This is how my page looks like:
(sllideshow specific to this page)

Category "apples"
post 1
post 2
post 3

Category "grapes"
post 1 grapes
post 1 grapes
post 1 grapes


if i use %categories-linked('delimiter')% in post 1 grapes, it sends me to Category "grapes"
but i want it to send me to Page "apples and grapes" cause thats where i've listed them nicely.

juggledad Jul 16, 2013 05:53 AM

Why don't you just put a link at the start of the text in each post linking to the page you want? simpler than having to edit the theme code each time there is an upgrade...

oh and if you really want to change the code, it is in bfa_postinfo.php

fullmetalgirl Jul 16, 2013 06:13 AM

the reason why i dont want to "just place a link"
is cause we're talking about 100+ posts wich might change category ..
I don't want to have to replace the link in each post to get what i want..

think i need to do something with this bit:

PHP Code:

// Categories, linked
    
if ( strpos($postinfo_string,'%categories-linked') !== FALSE ) {
        while ( 
strpos($postinfo,'%categories-linked') !== FALSE ) {
            
$category_linked_separator preg_match("/(.*)%categories-linked\('(.*?)'\)(.*)/i",
            
$postinfo_string,$category_linked_matches);
            
ob_start(); 
                
the_category($category_linked_matches[2]);
                  
$categories_linked ob_get_contents();
            
ob_end_clean();
            
$postinfo preg_replace("/(.*)%categories-linked\((.*?)\)%(.*)/i""\${1}" .
            
$categories_linked"\${3}"$postinfo);
        }
    } 

or this bit:
PHP Code:

    // Permalink
    
if ( strpos($postinfo_string,'%permalink%') !== FALSE ) {
        
ob_start(); 
            
the_permalink(); 
            
$permalink ob_get_contents(); 
        
ob_end_clean();
        
$postinfo str_replace("%permalink%"$permalink$postinfo);
    } 

no clue...

juggledad Jul 16, 2013 06:21 AM

so let me see if I can restate what you want. You want every category link to go to a particular page
cat 1 goes to page x
cat 2 goes to page y
cat 3 goes to page z
etc
etc
is that right?

fullmetalgirl Jul 16, 2013 06:26 AM

correct ..

juggledad Jul 16, 2013 06:55 AM

so this means everytime you add a category, you will have to edit something, create a new page and add a link to that page.

This is something outside the theme. I would suggest looking for or writting a plugin to hook into the wordpress category code and give you a way to link the category to the page you want.

If you don't know enough to attempt this, I'd suggest hiring someone to do it for you.

Sorry but this is beyond the free support I'm willing to give on the forum. I'll leave this thread open in case someone else wants to pip in with a suggestion.

fullmetalgirl Jul 16, 2013 06:59 AM

Ok, thnx anyway for giving me some info in where to look for it....


All times are GMT -6. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.