Jump to content
joaoreis

How Can I Make Simple Tag Work On Pagelines

Recommended Posts

joaoreis    0
joaoreis

Hello! Guys,

 

 I'm trying to make the plugin Simple tags work, which make appear tags for pages. I found that i had to put a specific code to make it work " Tags: <?php the_tags(' ', ', ', ''); ?> ". I would like to put the tags between the sharebar and the page content and i don't know how to do it.

 

 Do you have any idea on how can i do this? hooks? what php page should i put this code in?

 

 Or is there a way i can do it using some of the pageline settings?

 

Thanks in advance!

Share this post


Link to post
Share on other sites
Simon    247
Simon

Add to pagelines-customize/functions.php:

 

 

add_action( 'pagelines_loop_after_post_content', create_function( '', "if( is_page() ) the_tags(' ', ', ', '');" ) );
  • Like 1

Share this post


Link to post
Share on other sites
joaoreis    0
joaoreis

 Simon, that works!!

 

 The only thing i want to do now is add the word "Tags:" with a different color in the same line of the tags.

 

 Like this: Tags: test, mytag, etc,

 

 I've tried to add this:

add_action( 'pagelines_loop_after_post_content', create_function( '', "if( is_page() ) the_tags('<em style='color:#AAAAAA;'>Tags:</em> ', ', ', '');" ) );

 But this way doesn't work.

 

 And this way works but the tag line is bellow the word tag:

 

 function pagetags(){

echo "<div style='color:#AAAAAA;'>Tags: </div>";

}

 add_action( 'pagelines_loop_after_post_content', 'pagetags' );

 add_action( 'pagelines_loop_after_post_content', create_function( '', "if( is_page() ) the_tags(' ', ', ', '');" ) );
 

 Do you think is possible to do this?

 

 If not, no problem i'm gonna use the way it is.

 

Thanks a lot!

Share this post


Link to post
Share on other sites
Simon    247
Simon

 

add_action( 'pagelines_loop_after_post_content', create_function( '', "if( is_page() ) the_tags('<em style='color:#AAAAAA;'>Tags:</em> ', ', ', '');" ) );
  • Like 1

Share this post


Link to post
Share on other sites
joaoreis    0
joaoreis

That works! Thanks for your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • John Olsson
      By John Olsson+
      Hello, how do I show tags in WP-content-section... or what am I missing out? 
    • Dana
      By Dana+
      Hi DMS team,
      Please help out on how to add Post tags to the bottom of each post. Tried looking at the hooks tutorials but not sure what to do here.
      Thanks a lot.
       
       
       
       
    • JudithKlinger
      By JudithKlinger+
      I'm having a problem with post formatting that I never encountered before PL5. 
      I keep losing my paragraph formatting. I've gone in manually 4 and 5 times...adding in the <p></p> tags, updating...then I go to the visual editor or the pagebuilder and when I go back..they're gone and so is the 
      formatting. In digging around I think it has to do with the wpautop filter. See this: https://codex.wordpress.org/Function_Reference/wpautop
       
      I'm in the process of converting pages from DMS to PL5 and something in PL5 seems to be interacting with the formatting. I'm also getting other strange formatting issues (random <i></i> with no text n between, etc.)
      Frankly, I don't care if I need to manually add <p> or not... I just need the formatting to stick. 
      Thanks. J
       
    • dawsonbarber
      By dawsonbarber+
      Currently, the main heading for an element is automatically wrapped with a <h1> tag.
      That's okay if the content its wrapping around is, in fact, meant to be the main heading for the page.
      But I suspect there may be people who will already have a heading on the page wrapped with <h1> tags, so that's going to create a bit of a semantic issue (theoretically, from what I understand about HTML5 spec, it is possible to have more than one <h1> tag on a page, but you really need to know what you're doing).
      So I think that designers should have the option to select that tag for each text part that makes up an element.
      Additionally, if the main heading of an element is being used as the <h1> heading for a page, if designers are able to select the tag, then it should automatically wrap the <h1> tag with <header> tags (and maybe even the appropriate classes - e.g., entry-heading, entry-title).
      When you look at the other text parts that make up an element, you see that the subheading is automatically wrapped in a <h3> tag.
      If the main heading tag is a <h1> tag (as it is at present) then, logically/semantically, the subheading should be wrapped in <h2> tags or <p> tags (perhaps it could be set conditionally - depending on designer selection of main heading).
      Further, the subheading <h3> tag actually wraps around <p> tags that contain the subheading content.
      That makes no sense whatsoever.
      Finally when you specify a tag in the paragraph textbox of an element, it doesn't actually that tag as HTML. Instead, it adds a class - using the specified tag (e.g., class="h2") to a span.
      That also does not make sense.
    • eusebius
      By eusebius+
      Hello,
      Is there a way to mass apply a template to all tag archives?
      On my site, all tag archive pages claim they are using the Default template, but they look nothing like the Default template. I'm having a difficult reapplying that template to those pages without going through each one.
      Thanks in advance
      Thank God, I found the answer.
      My question was a bit more complex than I thought. It turns out that, when the Powerloop section is enabled, it overrides the queries for individual tags so that the page type reads pl_powerloop_TAG. It changes for each tag, which makes it impossible to target with a single template.
      When I disabled Powerloop (which I don't need anyway, since I use Toolset), all the tag queries reverted to normal and I was able to target that specific type with a template easily.
×